tvmjs
    Preparing search index...

    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 LibraryProvider.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 }.

    interface LibraryProvider {
        imports: Record<string, any>;
        start: (inst: Instance) => void;
    }

    Implemented by

    Index

    Properties

    Properties

    imports: Record<string, any>

    The imports that can be passed to WebAssembly instance creation.

    start: (inst: Instance) => void

    Callback function to notify the provider the created instance.

    Type Declaration

      • (inst: Instance): void
      • Parameters

        • inst: Instance

          The created instance.

        Returns void