You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(wasm): build wasm32 and wasm64 Preview 2 plugins - #65
Depends on csound/csound#3556. Keep this draft until that PR merges and matching npm releases can replace the temporary source checkout in CI.
The current wasm32 double plugins do not match either new engine. Build Chua, image, linear algebra, and STK for both wasm32-wasip2 with float samples and wasm64-wasip2 with double samples, using the matching Csound SDKs and source-built Nix toolchains. Wasm64 assets use the -wasm64.wasm suffix.
@csound/plugins selects wasm32 float to match the default browser engine. The /wasm32 and /wasm64 entry points each export one plugins object. Use /wasm64 with the opt-in @csound/browser/wasm64.js module. Static dependencies follow the selected target, and the linear-algebra code now accepts float samples.
Each plugin keeps its own Preview 2 file descriptors while following the engine's working directory. Wasm64 plugins embed adapters for their WASI imports, including STK's directory creation. CI pins csound/csound#3556 at 23eaa7fa28cadf26b2c453d53b8e789986e3bdf5, which includes WASI 0.2.12, LLVM 23.1.3, the loader support, and the wasm32 browser default. Keep the same nixpkgs pin and use libc++'s stream-copy fallback where WASI lacks Linux's copy_file_range.
The existing npm dependency versions predate Preview 2. Until matching releases exist, CSOUND_WASM_PACKAGE selects a built upstream source tree; the README describes that setup and the release steps.
Draft PRs are not automatically reviewed by default.
Trigger a manual review
To automatically review draft PRs, update your CodeRabbit configuration:
reviews:
auto_review:
drafts: true
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Tip
🎯 Customize your risk assessments
Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.
✅ Automatic approvals, with your rules
Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on csound/csound#3556. Keep this draft until that PR merges and matching npm releases can replace the temporary source checkout in CI.
The current wasm32 double plugins do not match either new engine. Build Chua, image, linear algebra, and STK for both
wasm32-wasip2with float samples andwasm64-wasip2with double samples, using the matching Csound SDKs and source-built Nix toolchains. Wasm64 assets use the-wasm64.wasmsuffix.@csound/pluginsselects wasm32 float to match the default browser engine. The/wasm32and/wasm64entry points each export onepluginsobject. Use/wasm64with the opt-in@csound/browser/wasm64.jsmodule. Static dependencies follow the selected target, and the linear-algebra code now accepts float samples.Each plugin keeps its own Preview 2 file descriptors while following the engine's working directory. Wasm64 plugins embed adapters for their WASI imports, including STK's directory creation. CI pins csound/csound#3556 at
23eaa7fa28cadf26b2c453d53b8e789986e3bdf5, which includes WASI 0.2.12, LLVM 23.1.3, the loader support, and the wasm32 browser default. Keep the same nixpkgs pin and use libc++'s stream-copy fallback where WASI lacks Linux'scopy_file_range.The existing npm dependency versions predate Preview 2. Until matching releases exist,
CSOUND_WASM_PACKAGEselects a built upstream source tree; the README describes that setup and the release steps.