WASM Global
A WASM Global is the WebAssembly global-variable object, sharing mutable globals across modules and JS for linking and configuration passing.
Purpose
To share global variables between WASM modules or between WASM and JS, supporting mutable and immutable, exportable and importable values.
Mechanism
new WebAssembly.Global({value, mutable}, init) creates a global; value/get/set read and write it. WASM modules can import and export Globals. mutable=true allows set. Used for WASI and linking.
Use cases
- WASM global variables
- Module linking
- WASM-JS shared state