Skip to content

feat(wasm): expand test suite, unwrap WebAssembly.Global and enable js-string builtins#22674

Open
guybedford wants to merge 1 commit into
vitejs:mainfrom
guybedford:feat/wasm-esm-integration
Open

feat(wasm): expand test suite, unwrap WebAssembly.Global and enable js-string builtins#22674
guybedford wants to merge 1 commit into
vitejs:mainfrom
guybedford:feat/wasm-esm-integration

Conversation

@guybedford

Copy link
Copy Markdown

Follow-on to the ESM Integration PR, to enable direct .wasm imports exposing exported WebAssembly.Global values unwrapped to their JS value, while retaining a backing table to support wasm-to-wasm global imports. This is done via a two-layer module split: a raw layer owns the instance and exposes globals as WebAssembly.Global objects, while the user-facing module re-exports the raw layer and unwraps globals (preserving live cells for wasm-to-wasm imports).

This PR also enables the JS String Builtins and Imported String Constants proposals on compile/instantiate, matching the spec and Node.js implementation.

…or direct imports

Direct .wasm imports now expose exported WebAssembly.Global values unwrapped
to their JS value, and support wasm-to-wasm global imports via a two-layer
module split: a raw layer owns the instance and exposes globals as
WebAssembly.Global objects, while the user-facing module re-exports the raw
layer and unwraps globals (preserving live cells for wasm-to-wasm imports).

Also enable the JS String Builtins and Imported String Constants proposals on
compile/instantiate, matching the WebAssembly/ES Module Integration loader.
@guybedford guybedford force-pushed the feat/wasm-esm-integration branch from 7ba7032 to 7b3269d Compare June 12, 2026 23:40
daltino

This comment was marked as spam.

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.

2 participants