Skip to content
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

wasm-pack seems to prefer system version of wasm-opt/binaryen #1446

Open
stephanemagnenat opened this issue Nov 7, 2024 · 0 comments
Open

Comments

@stephanemagnenat
Copy link

stephanemagnenat commented Nov 7, 2024

🐛 Bug description

On Ubuntu 22.04, if I have the binaryen package installed, wasm-pack seems to use it. This is a problem because the Ubuntu version (105) of binaryen has a broken wasm-opt (see this issue), that breaks compilation of some Rust code, especially with new Rust 1.82 that has enabled multivalues and reference-types.

🤔 Expected Behavior

I expect that either:

  • wasm-pack consistently uses its own wasm-opt, which is comes from a recent version of binaryen.
  • wasm-pack warns that my system-wide wasm-opt is too old and will miscompile my code.

Or, at least, that there is an option to force using the built-in version of wasm-opt, regardless of what is installed on the system.

👟 Steps to reproduce

I am calling wasm-pack through the Webpack wasm-pack-plugin. The miscompilation happens when compiling for production mode.

🌍 Your environment

Include the relevant details of your environment.
wasm-pack version: 1.13.1
rustc version: 1.82.0
Ubuntu version: 22.04.5
@wasm-tool/wasm-pack-plugin version: 1.7.0

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

1 participant