Interface LibraryProvider

Library interface provider that can provide syslibs(e.g. libs provided by WASI and beyond) for the Wasm runtime.

It can be viewed as a generalization of imports used in WebAssembly instance creation.

The start callback will be called to allow the library provider to initialize related resources during startup time.

We can use Emscripten generated js Module as a { wasmLibraryProvider: LibraryProvider }.

Hierarchy

  • LibraryProvider

Implemented by

Properties

Properties

imports: Record<string, any>

The imports that can be passed to WebAssembly instance creation.

start: ((inst) => void)

Type declaration

    • (inst): void
    • Callback function to notify the provider the created instance.

      Parameters

      • inst: Instance

        The created instance.

      Returns void

Generated using TypeDoc