defineModule method

void defineModule(
  1. String name,
  2. WasmStore store,
  3. WasmModule module
)

Defines name as the exports of module.

Implementation

void defineModule(String name, WasmStore store, WasmModule module) =>
    scoped((arena) {
      final (namePtr, nameLength) = copyChars(arena, name);
      throwIfError(
        c.wasmtime_linker_module(
          pointer,
          store.context,
          namePtr,
          nameLength,
          module.pointer,
        ),
      );
    });