-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
, reference-types
, and tail-call
target features
#131080
base: master
Are you sure you want to change the base?
Stabilize WebAssembly multivalue
, reference-types
, and tail-call
target features
#131080
Conversation
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? |
Would it make sense to add |
d42160b
to
1ee87c9
Compare
multivalue
and reference-types
target featurestail-call
target features
tail-call
target featuresmultivalue
, reference-types
, and tail-call
target features
Excellent point! I've added that in as well now. I've additionally expanded the commit message, PR description, and PR title to include I also realize though that this would be an insta-stable addition. If folks are uncertain about that I'm also happy to mark the feature as unstable for awhile. I'm relatively sure that the LLVM implementation is pretty mature though and @CryZe is right in that most engines are shipping this now, so the only part that might change is the feature name really and |
This comment has been minimized.
This comment has been minimized.
1ee87c9
to
6209f96
Compare
Some changes occurred in tests/ui/check-cfg cc @Urgau |
6209f96
to
1047029
Compare
@rfcbot fcp merge |
Team member @petrochenkov has proposed to merge this. The next step is review by the rest of the tagged team members:
No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
☔ The latest upstream changes (presumably #131511) made this pull request unmergeable. Please resolve the merge conflicts. |
1047029
to
ee1a547
Compare
Wanted to bump this again in case it fell out of folks' inboxes |
☔ The latest upstream changes (presumably #131900) made this pull request unmergeable. Please resolve the merge conflicts. |
ee1a547
to
b072776
Compare
🔔 This is now entering its final comment period, as per the review above. 🔔 |
☔ The latest upstream changes (presumably #132664) made this pull request unmergeable. Please resolve the merge conflicts. |
…` target features For the `multivalue` and `reference-types` features 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 two 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. This PR then additionally adds the `tail-call` feature which corresponds to the [tail-call] proposal to WebAssembly. This feature advanced to "phase 4" in the WebAssembly CG awhile back and has been supported in LLVM for quite some time now. Engines are finishing up implementations or have already shipped implementations, so while this is a bit of a late addition to Rust itself it reflects the current status of WebAssembly's state of the feature. A test has been added here not only for these 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 [tail-call]: https://github.com/webassembly/tail-call
b072776
to
3d7bf29
Compare
For the
multivalue
andreference-types
features this commit issimilar to #117457 in that it's stabilizing target features specific to
WebAssembly targets. The previous PR left out these two 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 ofthe
call_indirect
instruction. Additionally on Zulip there'sa use case of detecting these features at compile time and generating a
compile error to better warn users about features not supported on
engines.
This PR then additionally adds the
tail-call
feature which correspondsto the tail-call proposal to WebAssembly. This feature advanced to
"phase 4" in the WebAssembly CG awhile back and has been supported in
LLVM for quite some time now. Engines are finishing up implementations
or have already shipped implementations, so while this is a bit of a
late addition to Rust itself it reflects the current status of
WebAssembly's state of the feature.
A test has been added here not only for these features but other
WebAssembly features as well to showcase that they're usable without
feature gates in stable Rust.