Skip to main content

Module wasm

Module wasm 

Source
Expand description

Generic WASM Renderer for DemoEngine Implementations

Per specification SIMULAR-DEMO-002: This renderer is engine-agnostic. Any DemoEngine implementation can be rendered through this interface.

§Architecture

WASM bindings cannot use generic types directly with wasm-bindgen. This module provides:

  1. WasmRunner<E> - internal runner that wraps any DemoEngine
  2. JSON serialization for cross-boundary state transfer
  3. Common operations (step, pause, reset, get state)

Concrete WASM exports (e.g., WasmOrbitDemo) wrap WasmRunner internally.

Structs§

CriterionResultJson
JSON-serializable criterion result.
WasmRunner
Generic WASM runner that wraps any DemoEngine.
WasmState
JSON-serializable state for cross-boundary transfer.