-
Notifications
You must be signed in to change notification settings - Fork 13.3k
nightly-2025-02-18
wasm-opt cannot process resulting binary
#137315
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
Comments
Can you share a reproducer?
Can you bisect using cargo-bisect-rustc to find the relevant PR? |
This is due to the LLVM 20 upgrade, which enables bulk-memory and nontrapping-fptoint by default. Need to update https://doc.rust-lang.org/rustc/platform-support/wasm32-unknown-unknown.html#enabled-webassembly-features. |
I've sent #137322 for an update to the docs. Historically though otherwise this has generally been a "wontfix" issue in the sense that it's expected that new features will be enabled-by-default over time and downstream tooling should be expecting this. @Ddystopia are you running |
Oh I can also mention, the link that @nikic posted also has instructions/documentation for turning off on-by-default features if you find that helpful as well @Ddystopia |
I'm going to unmark this as a regression since it's expected that LLVM will continue to enable wasm features that become sufficiently baked. |
I will open corresponding issues. Should that issue be closed, considering that it is expected? |
I edited #137322's PR description to have that close this issue w/ the doc part once that merges. |
LLVM 20 enabled the `nontrapping-fptoint` and `bulk-memory` features by default, so this updates the corresponding documentation for the `wasm32-*` targets (which all point to `wasm32-unknown-unknown`). cc rust-lang#137315
…ieyouxu Update docs for default features of wasm targets LLVM 20 enabled the `nontrapping-fptoint` and `bulk-memory` features by default, so this updates the corresponding documentation for the `wasm32-*` targets (which all point to `wasm32-unknown-unknown`). Closes rust-lang#137315 with a doc update for the doc part.
A lot of downstream tools (e.g. So far the discussion here hasn't led to a clear way forward. It would be nice if |
It would be very helpful if someone with deep webassembly knowledge could weigh in on trunk-rs/trunk#904 . Would any of these options be the recommended way forward? Should trunk enable all the latest things by default as soon as llvm/rustc does? |
Rollup merge of rust-lang#137322 - alexcrichton:update-wasm-docs, r=jieyouxu Update docs for default features of wasm targets LLVM 20 enabled the `nontrapping-fptoint` and `bulk-memory` features by default, so this updates the corresponding documentation for the `wasm32-*` targets (which all point to `wasm32-unknown-unknown`). Closes rust-lang#137315 with a doc update for the doc part.
@eric-seppanen have you reached out to the |
@alexcrichton |
I'd recommend making a request that the default set of enabled features in binaryen either be (a) proposals that are stage 4+ or (b) proposals that are on-by-default in LLVM. In wasmtime/wasm-tools we do (a) and find that it works well for our use cases, but binaryen might have other use cases as well. In my mind if binaryen has good reason for not enabling a feature by default then that should be a factor in a decision to enable something in LLVM by default. Often though I find that things aren't on-by-default because it's just forgotten about. |
I bisected by hand and at
nightly-2025-02-18
wasm-opt
started giving errors like this:It asks for
--enable-bulk-memory
, if give it to it, other errors reveal (this is the whole output):For
wasm-opt
I tried versions form 116 to 120, all failed.I am compiling web application with
dioxus
, it useswasm-bindgen
.The text was updated successfully, but these errors were encountered: