You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We plan to implement WebAssembly/ES Module Integration in GraalJS. This allows WebAssembly modules to be imported similarly to ES modules to improve the ergonomics of WebAssembly module instantiation.
Details
Currently, there is an imperative JS API for instantiating WebAssembly modules. This requires users to manually fetch a module file, wire up imports, and run WebAssembly.instantiate or WebAssembly.instantiateStreaming.
A declarative API would improve the ergonomics by making this work happen implicitly.
import{foo}from"./myModule.wasm";foo();
Then by integrating with Source Phase Imports, arbitrary instantiations with custom imports can still be supported.
TL;DR
We plan to implement WebAssembly/ES Module Integration in GraalJS. This allows WebAssembly modules to be imported similarly to ES modules to improve the ergonomics of WebAssembly module instantiation.
Details
Currently, there is an imperative JS API for instantiating WebAssembly modules. This requires users to manually fetch a module file, wire up imports, and run
WebAssembly.instantiate
orWebAssembly.instantiateStreaming
.A declarative API would improve the ergonomics by making this work happen implicitly.
Then by integrating with Source Phase Imports, arbitrary instantiations with custom imports can still be supported.
For dynamically loaded modules, dynamic import() integration is also supported for both phases.
import source fibMod from "./fib.wasm
)import { fib } from "./fib.wasm
)The text was updated successfully, but these errors were encountered: