-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Add target_feature = "gc" for Wasm
#150111
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
base: main
Are you sure you want to change the base?
Conversation
This comment has been minimized.
This comment has been minimized.
|
Ah, 'tis unfortunate, will have to wait until the next LLVM version. |
|
Looks good to me, thanks! You can update this function to skip the feature on unsupported LLVM versions. Do you have a use case in mind for the insta-stable-ness? I would expect that the GC configuration for wasm-bindgen would be out-of-band rather than via a compiler configuration (e.g. an extra flag to wasm-bindgen itself) |
In the meantime of course |
Done. |
This PR adds a new target feature for Wasm targets: GC.
I went ahead and made this insta-stable because 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.Companion PR: rust-lang/reference#2114.
r? @alexcrichton