circu.js
    Preparing search index...

    Namespace CModuleWASM

    WebAssembly low-level bindings for txiki.js Loaded via import.meta.use('wasm')

    This is a low-level API that directly exposes WAMR capabilities. Unlike the standard WebAssembly JS API, this requires manual import resolution.

    const wasm = import.meta.use('wasm');

    // Parse module
    const module = wasm.parseModule(bytes);

    // Get imports info
    const imports = wasm.moduleImports(module);

    // Resolve function imports
    const importDescs = imports.map(imp => ({
    module: imp.module,
    name: imp.name,
    func: myImportFunc
    }));
    wasm.resolveImports(module, importDescs);

    // Set WASI options (optional)
    wasm.setWasiOptions(module, ['arg1', 'arg2'], { ENV_VAR: 'value' }, { '/guest': '/host' });

    // Build instance
    const instance = wasm.buildInstance(module);

    // Call exported function
    const result = instance.callFunction('exportedFunc', arg1, arg2);

    Interfaces

    GlobalImportDescriptor
    GlobalInfo
    ImportFunctionDescriptor
    Instance
    MemoryImportDescriptor
    Module
    ModuleExportDescriptor
    ModuleImportDescriptor
    TableImportDescriptor
    TableInfo
    WasiEnv
    WasiPreopens

    Type Aliases

    WasmErrorName
    WasmValue

    Functions

    buildInstance
    callFuncByIndex
    getFuncIndex
    getGlobal
    getGlobalInfo
    getMemoryBuffer
    getStackSize
    getTableInfo
    growMemory
    moduleCustomSections
    moduleExports
    moduleImports
    parseModule
    resolveGlobalImports
    resolveImports
    resolveMemoryImports
    resolveTableImports
    setGlobal
    setStackSize
    setWasiOptions
    tableGet
    tableGrow
    tableSet
    tableSize
    validate