@celox-sim/celox / index / createWasmSimulatorBridge
Function: createWasmSimulatorBridge()
createWasmSimulatorBridge(
raw):WasmBridgeResult
Defined in: packages/celox/src/wasm-bridge.ts:108
Create a NativeSimulatorHandle-compatible wrapper from a wasm32-compiled NAPI handle.
- Reads metadata (layout, events, sizes) from the raw handle.
- Creates a WebAssembly.Memory large enough for the simulation state.
- Synchronously compiles and instantiates the combinational and event WASM modules, importing the shared memory.
- Returns a handle whose
tick()/evalComb()drive the WASM instances.
Parameters
raw
Returns
A bridge result with the wrapped handle and shared memory view.