Skip to content

Backends

cmotion has multiple backends so the same program runs on a CPU server, in a browser, on a GPU, or embedded in a host application. The language semantics are defined by the reference interpreter; every backend must agree with it.

Compiles a cmotion program to a WASM component (Component Model). The component is the portable artifact — any host with a Component Model runtime (wasmtime, jco, browser) can load and run it.

Status: not started. See Roadmap stage 5.

Deterministic offline render. CanvasKit (Skia compiled to WASM) draws each frame to a buffer; output is bit-identical across machines. This is the export path — .mp4/.png sequences for final delivery.

Status: not started. See Roadmap stage 6.

GPU codegen to WGSL for realtime preview. Runs through wgpu so the same shader code targets Vulkan, Metal, DX12, and WebGPU. This is the editor/preview path — interactive scrubbing, parameter tweaking, live reload.

Status: not started. See Roadmap stage 7.

Backends are tested against the reference interpreter:

LayerHow tested
Valueswasmtime, headless, every commit
Offline renderCanvasKit + golden PNG diffs, every commit
GPU renderwgpu headless adapter + golden diffs, nightly