-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Stabilize WebAssembly multivalue
and reference-types
target features
#131080
base: master
Are you sure you want to change the base?
Stabilize WebAssembly multivalue
and reference-types
target features
#131080
Conversation
This commit is similar to rust-lang#117457 in that it's stabilizing target features specific to WebAssembly targets. The previous PR left out these features because they weren't expected to change much about compiled code so it was unclear what the rationale was. It has [since been discovered][blog] that `reference-types` can be useful as it changes the binary format of the `call_indirect` instruction. Additionally [on Zulip][zulip] there's a use case of detecting these features at compile time and generating a compile error to better warn users about features not supported on engines. A test has been added here not only for these two features but other WebAssembly features as well to showcase that they're usable without feature gates in stable Rust. [blog]: https://blog.rust-lang.org/2024/09/24/webassembly-targets-change-in-default-target-features.html [zulip]: https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/wasm32.20reference-types.20.2F.20multivalue.20in.201.2E82-beta.20not.20enabled/near/473893987
rustbot has assigned @petrochenkov. Use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes LGTM. As far as I understand it, this stabilizes multivalue
and reference-types
target features (aka wasm proposals) which are already enabled-by-default through the llvm 19 update.
But let's also have someone on T-compiler double-check.
EDIT: this definitely needs relnotes
In case anyone's curious, this is a longer description of what stabilization of these features mean and for |
Whenever you get a chance, can you also post a PR to update the docs at https://github.com/rust-lang/reference/blob/9c21beeaa59566d87191392548c421cc7baa941a/src/attributes/codegen.md?plain=1#L276-L284? |
This commit is similar to #117457 in that it's stabilizing target features specific to WebAssembly targets. The previous PR left out these features because they weren't expected to change much about compiled code so it was unclear what the rationale was. It has since been discovered that
reference-types
can be useful as it changes the binary format of thecall_indirect
instruction. Additionally on Zulip there's a use case of detecting these features at compile time and generating a compile error to better warn users about features not supported on engines.A test has been added here not only for these two features but other WebAssembly features as well to showcase that they're usable without feature gates in stable Rust.