Architecture
Darkly is split into three layers:
- Rust core (
crates/darkly/) — platform-agnostic GPU compositor, filters, brush engine. Targetswgpuand knows nothing about the DOM. - WASM bridge (
frontend/wasm/) — thin Rust wrapper compiled to WebAssembly viawasm-pack, exposing the core to JavaScript. - 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.