A component framework for Cot. Svelte's compiler-driven reactivity, compiled to WebAssembly instead of JavaScript.
Named after Dexter, a faithful 14-year-old husky.
Dex is a faithful port of Svelte to the Cot programming language. Where Svelte compiles .svelte components to optimized JavaScript, Dex compiles .dex components to optimized WebAssembly.
component Counter {
var count: int = 0
<button class="btn" on:click={count += 1}>
"Clicked ${count} times"
</button>
}
The Dex compiler analyzes reactive dependencies at compile time and generates Wasm that performs surgical DOM updates — no virtual DOM, no runtime framework, no JavaScript bundle.
React ships a 40KB runtime to diff virtual DOM trees at runtime. Svelte proved that reactivity is a compiler problem, not a runtime problem — but it still compiles to JavaScript. Dex takes the next step: compile to Wasm.
The result is smaller bundles, faster execution, and a real type system — with the same developer experience that made Svelte the most loved web framework.
Early development. See VISION.md for the full architecture and roadmap.
src/ Dex compiler and runtime (Cot)
references/svelte/ Svelte source (reference implementation)