Skip to content

Conversation

@daxpedda
Copy link
Contributor

@daxpedda daxpedda commented Dec 20, 2025

Follow-up to #150111, stabilizing the new target features.

[..] it has already passed phase 5 in addition to being implemented and stabilized by all major JS engines.

This doesn't enable the target feature by default!

For context: while this proposal adds a lot of new features to Wasm, they are not accessible through Rust apart from unstable inline ASM. This is largely useful to signal tools to make use of the feature, e.g. wasm-bindgen, where this can be used to make some pretty optimizations.

While merging this has to wait until LLVM 22 releases, which is a long way off, I thought it might still be sensible to get FCP approval now. But let me know if this would be considered too premature.

Addresses #150260.
Companion PR: rust-lang/reference#2114.

r? @alexcrichton

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Dec 20, 2025
@alexcrichton
Copy link
Member

To confirm about wasm-bindgen's use case, the intention here is that users will specify -Ctarget-feature=+gc during compilation, that'll make its way to the target-features custom section in the wasm module (emitted by LLD), and then wasm-bindgen will pick that up and act on it?

@daxpedda
Copy link
Contributor Author

Yes!

As I mentioned, this isn't a dealbreaker because we can just add a global flag.
However, this isn't the case for the next version of wasm-bindgen, where we don't do any post-processing.
We would require enabling LLVMs gc support to feed GC instructions to the linker.

@alexcrichton
Copy link
Member

Ok going off the prior stabilization from #131080 that also used T-compiler as the team. I would agree it's reasonable to kick off an FCP here before LLVM 22 is released, so let's see what happens if...

@rfcbot fcp merge

@rust-rfcbot

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants