Skip to content

wasm-opt invocation fails on Rust 1.87 #1501

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
printfn opened this issue May 17, 2025 · 2 comments
Open

wasm-opt invocation fails on Rust 1.87 #1501

printfn opened this issue May 17, 2025 · 2 comments

Comments

@printfn
Copy link
Contributor

printfn commented May 17, 2025

🐛 Bug description

I'm getting wasm-opt errors in Rust 1.87.
Here's a minimal reproduction: https://github.com/printfn/repro/tree/rust-wasm-bulk-memory

I believe this issue is caused by the LLVM 20 upgrade in rustc.
I've found that adding additional wasm-opt flags --enable-nontrapping-float-to-int and --enable-bulk-memory seems to fix the issue. Perhaps these just need to be enabled by default?

🤔 Expected Behavior

It should have built.

👟 Steps to reproduce

  1. Clone the repo
  2. wasm-pack build

🌍 Your environment

Include the relevant details of your environment.
wasm-pack version: 0.13.1
rustc version: 1.87.0

@sunng87
Copy link

sunng87 commented May 21, 2025

@darioAnongba
Copy link

Yes, the description is correct for the issue (about LLVM 20+ and Rust 1.87+), see here.
Would be glad to get a wasm-pack upgrade where wasm-opt is updated to avoid these issues.

Hotfix:

[package.metadata.wasm-pack.profile.release]
wasm-opt = ["--enable-bulk-memory", "--enable-nontrapping-float-to-int"]

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

No branches or pull requests

3 participants