Closed as not planned
Description
After upgrading to the latest release, it looks like the llvm update broke my ci pipeline for the Wasm build.
The command that’s failing:
wasm-pack build --target nodejs --release --scope nbittich ./rdfa-wasm
Error message:
unexpected false: Bulk memory operations require bulk memory [--enable-bulk-memory], on ...
Here’s the GitHub Actions run where it failed:
https://github.com/nbittich/graph-rdfa-processor/actions/runs/15053071089
After some digging, I found this in the Rust docs (beta):
https://doc.rust-lang.org/beta/rustc/platform-support/wasm32-unknown-unknown.html
To fix it, I ended up making a few changes:
- Added this to Cargo.toml:
[package.metadata.wasm-pack.profile.release] wasm-opt = ["-O", "--enable-bulk-memory", "--enable-mutable-globals"]
- Also added the Rust compiler flag:
-Ctarget-cpu=mvp
The commit with the fix:
nbittich/graph-rdfa-processor@f822e1e
It would be nice to mention this somewhere, maybe in the release notes, as it took me a bit to figure out what was going on. Hope this helps others who might run into the same issue.
Edit: this is rust stable (1.87.0)