Skip to content
uencoder

WASM Instantiate

WASM instantiation binds a Module with its imports to create an Instance, allocating Memory/Table and running the start function.

Purpose

To instantiate the compiled WASM module into a callable instance, binding imported functions and memory, and starting execution.

Mechanism

WebAssembly.instantiate(module, imports)→Promise<Instance>: allocates Memory/Table, resolves imports (JS functions or other WASM exports), links the module, and runs the start function. Instance.exports exposes exported functions for JS to call.

Use cases

  • WASM instance creation
  • Import binding
  • WASM-JS interop

Related tools

References