Execute In-Process WebAssembly Script
icx_wasm_execExecutes compiled WebAssembly (WASM) bytecode or WAT text in-process with direct sub-100 microsecond Go host function memory bindings (icx_search, icx_recall, icx_quote, icx_remember, icx_walk, icx_get_var, icx_set_var, icx_stats). Eliminates subprocess spawning and socket IPC for high-frequency trading and low-latency robotics. Mutating/read operation. Requires X-License-Key authentication.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | The WASM bytecode (base64 or binary string), WAT text, or in-process ICX script to execute. | |
| space_id | No | Optional memory space partition to execute within (default: 'default'). | |
| timeout_ms | No | Optional execution timeout in milliseconds (default: 50ms, max: 500ms). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | description=Error message if execution failed | |
| status | Yes | description=Execution status (success | error | timeout) | |
| stderr | No | description=Captured stderr or error trace | |
| stdout | Yes | description=Captured stdout from print() statements | |
| memory_ops_count | Yes | description=Count of memory queries or mutations performed | |
| execution_time_ms | Yes | description=Wall-clock execution time in milliseconds | |
| grounded_fact_count | Yes | description=Count of grounded memory facts accessed |