Skip to content

Specification §16.3 and §29.14: @[import_module] names an extern fn's WebAssembly import namespace - #1263

Merged
ehartford merged 1 commit into
mainfrom
spec-import-module-attribute
Sep 21, 2026
Merged

ehartford merged 1 commit into
mainfrom
spec-import-module-attribute

Conversation

@ehartford

Copy link
Copy Markdown
Contributor

Docs-only. #1210 shipped @[import_module("ns")] with no specification text, so spec-inventory-check (which reads §29.14's attribute index) has been red on main and on every PR since. This adds the §16.3 paragraph beside link_name and the §29.14 row:

@[import_module("ns")] on an extern fn names the WebAssembly import namespace the symbol is imported from; without it the namespace is env. It applies only to the wasm32 target and does not change the function type or safety contract.

Wording as proposed in the ruling brief (Rust #[link(wasm_import_module)], Zig extern "ns", Clang import_module all default to env); landed at Eric's "can you fix it" — amend the words here if you want them different. spec-inventory-check: green on this branch. CI's four non-mac lanes are red for an unrelated reason (#1259 / #1262).

…n fn's WebAssembly import namespace

#1210 shipped the attribute with no spec text; spec-inventory-check has
been red on main since. Wording as proposed in the brief and landed at
Eric's "can you fix it"; §29.14's attribute index row is what the
inventory reads.
@ehartford
ehartford merged commit 12d1b3d into main Sep 21, 2026
1 of 5 checks passed
@ehartford
ehartford deleted the spec-import-module-attribute branch September 24, 2026 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant