Skip to content

Architecture

Darkly is split into three layers:

  1. Rust core (crates/darkly/) — platform-agnostic GPU compositor, filters, brush engine. Targets wgpu and knows nothing about the DOM.
  2. WASM bridge (frontend/wasm/) — thin Rust wrapper compiled to WebAssembly via wasm-pack, exposing the core to JavaScript.
  3. Svelte UI (frontend/src/) — Svelte 5 + Vite, talks to the bridge and renders canvases via WebGPU.

The website and docs live alongside in website/ (Astro + Starlight) and share design tokens with the UI through the @darkly/styles workspace package.