Skip to main content

callback

Cross-module function call bindings Allows passing function references between WASM modules via the host. The host stores (exec_env, table_index) pairs and invokes them on demand.

// @ts-ignore
@external("callback", "callback_register")
export declare function callbackRegister(tableIdx: u32): u32;


// @ts-ignore
@external("callback", "callback_invoke")
export declare function callbackInvoke(handle: u32, argsPtr: u32, nArgs: u32): u32;


// @ts-ignore
@external("callback", "callback_unregister")
export declare function callbackUnregister(handle: u32): void;