Canvas & Rendering

86fps IR-replay rendering with infinite canvas, precision tools, and native Rust performance.

What It Is

Varve's canvas system uses IR-replay architecture: the Rust engine computes the scene and emits a compact intermediate representation (~42 KB/frame for 600 shapes), which the webview replays to canvas2D. This separation enables 86fps rendering on Wayland compared to 8.5fps with pixel-pushing approaches.

Key Capabilities

  • Infinite canvas: Floating origin camera system for unlimited workspace
  • Viewport culling: Only render what's visible for performance at scale
  • Dirty-rect redraw: Minimize redraws to changed regions
  • Precision tools: Sticky snap, numerical precision, sub-pixel accuracy
  • Multi-page support: Work with multiple artboards/pages in one document
  • Rulers and guides: Visual guides for alignment and measurement
  • Grid overlays: Configurable grid patterns for precision work

Technical Depth

The rendering pipeline is built on IR-replay (ADR-0001), validated empirically on Wayland Linux. The engine uses viewport culling, dirty-rect redraw, and spatial indexing for fast hit testing. The SubtreeReplayCache optimizes repeated rendering of unchanged subtrees.

Current benchmarks show 86fps canvas2D replay with the IR-replay architecture. The same facade works on desktop (native Rust via Tauri IPC) and web (WASM) with zero functional compromise.

Limitations

Current limitations:

  • No artboard-local coordinate space (uses global canvas coordinates)
  • Collaboration features are UI scaffolding only (no transport or wire protocol)

Related Documentation

Ready to try it?

Download Varve