Open
Description
JavaScript API has WebAssembly.compile
and WebAssembly.instantiate
.
There seems to be no equivalent to this in wasi.
For example, if wasi have this, it should be able to realize a JIT compiler by generating a wasm module bytes and instantiating it by passing a function or memory. We can already do this with the JavaScript API.
Module-linking proposal
This looks like a problem that the module-linking proposal doesn't solve.
The general case of runtime dynamic linking in the style of
dlopen
, where an
a priori unknown module is linked into the program at runtime, is not possible
to do purely within wasm with this proposal. Additional host-provided APIs are
required for:
- compiling files or bytes into a module;