Skip to content

feat(wasm): build wasm32 and wasm64 Preview 3 plugins - #65

Draft
hlolli wants to merge 6 commits into
csound:developfrom
hlolli:feat/wasm-preview2-targets
Draft

hlolli wants to merge 6 commits into
csound:developfrom
hlolli:feat/wasm-preview2-targets

Conversation

@hlolli

@hlolli hlolli commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Depends on csound/csound#3556. Keep this draft until that PR merges and matching npm releases can replace the source checkout in CI.

Build the Chua, image, linear algebra, and STK plugins for WASI Preview 3 (0.3.2). The wasm32 build uses float samples, and the wasm64 build uses double samples. Both use 64-bit cs_double. The matching Csound SDK supplies the generated headers, and LLVM and wasi-libc build from the same Nix pins as the engine.

@csound/plugins selects wasm32 float. Use @csound/plugins/wasm64 with the opt-in @csound/browser/wasm64.js engine. Each entry exports one plugins object. Wasm64 assets end in -wasm64.wasm.

The plugins follow the engine's working directory and keep their own libc descriptor tables. Wasm64 plugins embed the Preview 3 adapter for their WASI imports. Keep libc++'s stream-copy fallback for WASI filesystems.

CI builds the matching engines and Csound SDKs from 1b7028d766693e51bb33118d2193ab0361d62524 of csound/csound#3556. Until matching npm releases exist, set CSOUND_WASM_PACKAGE to the built Csound source tree.

@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Important

Draft PR not reviewed

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

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.

Share

@hlolli
hlolli force-pushed the feat/wasm-preview2-targets branch from df9d1de to 1565d2e Compare November 6, 2026 06:26
@hlolli hlolli changed the title feat(wasm): build wasm32 and wasm64 Preview 2 plugins feat(wasm): build wasm32 and wasm64 Preview 3 plugins Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant