Skip to content

[wasm] Named import live bindings for ESM mutable globals - #62120

Open
chicoxyzzy wants to merge 1 commit into
web-platform-tests:masterfrom
chicoxyzzy:wasm-named-import-live-bindings
Open

[wasm] Named import live bindings for ESM mutable globals#62120
chicoxyzzy wants to merge 1 commit into
web-platform-tests:masterfrom
chicoxyzzy:wasm-named-import-live-bindings

Conversation

@chicoxyzzy

@chicoxyzzy chicoxyzzy commented Aug 21, 2026

Copy link
Copy Markdown

global-exports-live-bindings only checks namespace property access (ns.g). The ESM integration spec also makes a static named import live:

import { mutableValue, setGlobal } from "./mod.wasm";
setGlobal(222);
assert_equals(mutableValue, 222);

This adds that, plus the JS re-export form (export { mutableValue } from "./mod.wasm").

Uses the existing mutable-global-export.wasm fixture. Reuses mutableValue / setGlobal / getGlobal.

global-exports-live-bindings only reads namespace properties (ns.g).
The ESM integration spec also makes `import { g } from "./mod.wasm"` a
live binding. Cover that, plus JS `export { g } from "./mod.wasm"`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants