emscripten: adds experimental InstantiateForModule for invoke exports (#1372)
This adds emscripten.InstantiateForModule into the experimental package. This builds dynamic invoke exports in the same order and only matching those needed by the importing modules. Finally, this removes special casing of function type IDs by deferring resolution of them only in Emscripten. Fixes #1364 Signed-off-by: Adrian Cole <adrian@tetrate.io>
This commit is contained in:
@@ -23,6 +23,12 @@ import (
|
||||
// defer r.Close(ctx) // This closes everything this Runtime created.
|
||||
//
|
||||
// mod, _ := r.Instantiate(ctx, wasm)
|
||||
//
|
||||
// # Notes
|
||||
//
|
||||
// - Closing this closes any CompiledModule or Module it instantiated.
|
||||
// - This is an interface for decoupling, not third-party implementations.
|
||||
// All implementations are in wazero.
|
||||
type Runtime interface {
|
||||
// Instantiate instantiates a module from the WebAssembly binary (%.wasm)
|
||||
// with default configuration.
|
||||
|
||||
Reference in New Issue
Block a user