-
Notifications
You must be signed in to change notification settings - Fork 13.3k
rustc: Stabilize #[wasm_import_module] #52441
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
Conversation
r? @eddyb (rust_highfive has picked a reviewer for you, use r? to override) |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
This commit stabilizes the `#[wasm_import_module]` attribute. Tracked by rust-lang#52090 this issue can be attached to foreign modules (`extern { ... }` blocks) and is used to configured the module name that the imports are listed with. The WebAssembly specification indicates two utf-8 names are associated with all imported items, one for the module the item comes from and one for the item itself. The item itself is configurable in Rust via its identifier or `#[link_name = "..."]`, but the module name was previously not configurable and defaulted to `"env"`. This commit ensures that this is also configurable. Closes rust-lang#52090
ab0925f
to
75e34ac
Compare
Looks like the sentiment in #52090 (comment) was to make it a modifier on |
Er argh yes, forgot about that! Thanks for the reminder, I'll make a new PR soon |
New PR is at #52445 |
This commit stabilizes the
#[wasm_import_module]
attribute. Tracked by #52090this issue can be attached to foreign modules (
extern { ... }
blocks) and isused to configured the module name that the imports are listed with. The
WebAssembly specification indicates two utf-8 names are associated with all
imported items, one for the module the item comes from and one for the item
itself. The item itself is configurable in Rust via its identifier or
#[link_name = "..."]
, but the module name was previously not configurable anddefaulted to
"env"
. This commit ensures that this is also configurable.Closes #52090