forked from jbms/wasm-split-prototype
-
Notifications
You must be signed in to change notification settings - Fork 4
Support non-web wasm targets #4
Copy link
Copy link
Open
Labels
future-versionAn definite idea or improvement for a future version. Might or might not be planned or in progress.An definite idea or improvement for a future version. Might or might not be planned or in progress.
Description
Metadata
Metadata
Assignees
Labels
future-versionAn definite idea or improvement for a future version. Might or might not be planned or in progress.An definite idea or improvement for a future version. Might or might not be planned or in progress.
Currently, the emitted link module is either an ECMAScript module, or a webpack compatible "bundle".
In case of ECMAScript:
importto discover the wrapper for the main moduleexportto expose the loader functions.import.meta.urlto resolve the wasm sources.In case of bundle:
wasmfile directly to get the exports from the main fileexportto expose the loader functionsimport.source(<module path>)to load, thennew WebAssembly.Instance(module)to instantiateMore and other targets like deno, bun, node etc could be added.