Expand description
Step-based program runner for WASM targets.
WasmRunner drives an ftui Model without threads, blocking polls, or
OS-level I/O. Instead, the host (JavaScript) delivers events via
[push_event] and calls [step] / [render] from its own animation loop.
The execution model is:
JS animation frame
→ push_event(Event) // keyboard, mouse, resize
→ step(now) // drain events, fire ticks, run model.update
→ render() // if dirty: model.view → Buffer + optional Diff
→ present the output // apply patches to WebGPU / canvasDeterministic record/replay: all inputs go through the event queue with
monotonic timestamps from the host clock (performance.now()), so replaying
the same event stream produces identical frames.
Structs§
- Rendered
Frame - Rendered frame output from
WasmRunner::render. - Step
Result - Outcome of a single
WasmRunner::stepcall. - Wasm
Runner - Step-based program runner for WASM (no threads, no blocking).