Skip to content

fix(ci): Enable bulk-memory for wasm-opt in WASM builds#37

Merged
JuanMarchetto merged 1 commit into
mainfrom
fix/wasm-bulk-memory
Feb 26, 2026
Merged

fix(ci): Enable bulk-memory for wasm-opt in WASM builds#37
JuanMarchetto merged 1 commit into
mainfrom
fix/wasm-bulk-memory

Conversation

@jeanclawdbotdamn

Copy link
Copy Markdown
Collaborator

Summary

  • Rust 1.84+ emits bulk memory operations (memory.copy, memory.fill) for wasm32-unknown-unknown by default
  • The wasm-opt bundled with wasm-pack rejects these unless --enable-bulk-memory is passed
  • Adds [package.metadata.wasm-pack.profile.release] with wasm-opt = ["-O", "--enable-bulk-memory"] to crates/truss-wasm/Cargo.toml

This fixes the Deploy Playground CI failure after #36 (endian.h was fixed, but wasm-opt validation then failed).

Test plan

  • cargo clippy --workspace -- -D warnings — clean
  • Deploy Playground workflow succeeds on merge

🤖 Generated with Claude Code

Rust 1.84+ emits bulk memory operations (memory.copy, memory.fill)
for wasm32-unknown-unknown by default. The wasm-opt bundled with
wasm-pack rejects these unless --enable-bulk-memory is passed.

Add [package.metadata.wasm-pack.profile.release] to truss-wasm's
Cargo.toml to pass the flag to wasm-opt.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@JuanMarchetto JuanMarchetto merged commit ad937f5 into main Feb 26, 2026
8 checks passed
@JuanMarchetto JuanMarchetto deleted the fix/wasm-bulk-memory branch February 26, 2026 18:51
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.

2 participants