A compiled, reactive web language targeting WebAssembly Garbage Collection (Wasm-GC) with zero Virtual DOM, sub-millisecond mounting, and micro-footprint binaries.
See the codeA compiled, reactive web language targeting WebAssembly Garbage Collection (Wasm-GC) with zero Virtual DOM, sub-millisecond mounting, and micro-footprint binaries.
Live Demo | About | Why Volt? | Overview | Architecture | Language Specification | Getting Started | Comparison | CLI Reference | FAQ | License
[!TIP] Experience the performance difference live: voltdemo.vercel.app runs a high-scale 3D force-directed graph simulation compiled with Volt.
Volt is a purpose-built, statically typed programming language designed from the ground up for the next generation of high-performance web applications.
Historically, web developers have faced a fundamental compromise:
Volt eliminates this tradeoff by targeting standard WebAssembly Garbage Collection (Wasm-GC). By leveraging the host browser's native garbage collector and compiling declarative UI definitions directly into deterministic, bitmask-driven reactive dispatch tables, Volt delivers:
dom.setTextContent), making updates $O(1)$ without any tree diffing.| Challenge in Modern Web | Traditional Approach | The Volt Approach |
|---|---|---|
| Runtime Overhead | 45 KB+ JS runtime & framework core | < 1.5 KB micro-bootloader |
| Reactivity Cost | Runtime dependency tracking & VDOM diffing | Ahead-of-Time (AOT) bitmask dispatch graph |
| Memory Management | JS Garbage Collector thrashing with VDOM nodes | Native Wasm-GC structs integrated with host engine |
| DOM Interaction | Heavy synthetic events & tree traversal | Direct host pointer bindings & table funcrefs |
| Startup Performance | Parsing & executing multi-megabyte JS bundles | Instant streaming compilation & execution |
Volt (.vt) is a statically typed, expression-oriented language targeting WebAssembly Garbage-Collected (Wasm-GC) binary modules. It eliminates JavaScript hydration taxes and Virtual DOM overhead through direct host pointer bindings and fine-grained reactive update dispatch.
dom.setTextContent) with zero VDOM diffing or reconciliation passes.struct.new, struct.get, struct.set) managed seamlessly by host browser garbage collection..d.ts declaration files for compiled Wasm modules and supports type-safe extern "js" host function imports.<volt-app src="..."> custom element runtime under 1.5 KB (boot.js).Volt compiles high-level .vt declarative component definitions directly into standard WebAssembly GC bytecode via an ahead-of-time reactivity planning engine:
flowchart TD
Source[".vt Source File"] --> Lexer["Lexer / Tokenizer"]
Lexer --> Parser["Recursive Descent Parser"]
Parser --> AST["Abstract Syntax Tree (AST)"]
subgraph Analysis["Reactivity & Dependency Analysis"]
AST --> ReactivePlan["AOT Reactivity Analyzer"]
ReactivePlan --> SignalGraph["Signal Dependency Bitmasks"]
ReactivePlan --> DynamicSlots["Dynamic Text / Attr Slots"]
ReactivePlan --> ElementPlan["Linear DOM Creation Plan"]
end
subgraph Codegen["Wasm-GC Binary Emission"]
SignalGraph --> WasmCompiler["Wasm-GC Bytecode Compiler"]
DynamicSlots --> WasmCompiler
ElementPlan --> WasmCompiler
WasmCompiler --> WasmBinary[".wasm Binary (GC Structs + Dispatch Table)"]
WasmCompiler --> DtsEmitter[".d.ts TypeScript Declarations"]
end
subgraph Runtime["Browser Host Execution (< 1.5 KB Bootloader)"]
WasmBinary --> HostDOM["Direct DOM Updates (externref + dom.setTextNumber)"]
end
Every signal in a Volt component is mapped to a dedicated struct field in Wasm-GC memory with a corresponding bitmask flag:
$$\text{Dirty Mask} = \bigvee_{i \in \text{Modified}} (1 \ll \text{Signal ID}_i)$$
When an action mutates a signal, the component updates the struct field, applies bitwise masking across computed expressions and dynamic DOM text slots, and triggers surgical updates to the host DOM with zero tree walking.
Volt combines clean, concise syntax with explicit reactivity declarations:
extern "js" {
fn logMetric(event: string, value: i32);
}
export component Counter {
signal count: i32 = 0;
signal step: i32 = 1;
computed doubled: i32 = count * 2;
fn increment() {
count += step;
logMetric("count_updated", count);
}
fn reset() {
count = 0;
}
render {
<div class="counter-card">
<h2>"Volt Reactive Counter"</h2>
<p>"Current Value: " {count} " (Doubled: " {doubled} ")" </p>
<div class="actions">
<button @click=increment>"Increment"</button>
<button @click=reset>"Reset"</button>
</div>
</div>
}
}
signal <name>: <type> = <expr>;: Reactive state primitive mapped directly to Wasm-GC struct fields.computed <name>: <type> = <expr>;: Pure derived expression recalculated only when upstream signal bitmasks trip.extern "js" { ... }: Type-safe FFI interface allowing Volt components to call host JavaScript functions and browser APIs.fn <name>(<args>) { ... }: Component methods exposed to host DOM event listeners via WebAssembly Table funcref indices.render { <jsx> }: Declarative DOM structure compiled into a linear sequence of host DOM allocations and static text nodes.cargo)Clone the repository and build the release binary:
git clone https://github.com/bshea-1/volt.git
cd volt
cargo build --release
The compiled binary is available at ./target/release/volt.
Compile a .vt file into a WebAssembly GC module with companion TypeScript declarations:
volt build component.vt -o component.wasm --dts component.d.ts
Verify syntax, signal graphs, dynamic text slots, and reactive dependencies without emitting bytecode:
volt check component.vt
Mount the compiled component into any web page using the Volt micro-bootloader:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Volt App</title>
</head>
<body>
<!-- Declarative Volt Web Component -->
<volt-app src="./component.wasm"></volt-app>
<!-- Lightweight Micro-Bootloader (< 1.5 KB) -->
<script type="module" src="./boot.js"></script>
</body>
</html>
Start a development server with native WebAssembly MIME configurations:
volt serve --port 3000 --dir examples
| Feature | Volt (.vt) | React 19 | Svelte 5 | SolidJS | Traditional Wasm (Rust/C++) |
|---|---|---|---|---|---|
| Virtual DOM Overhead | None (0 B) | High (Full VDOM) | None | None | None |
| Runtime / Bootloader Size | < 1.5 KB | ~45 KB | ~15 KB | ~7 KB | 50 KB – 2 MB+ (Glue + Allocator) |
| GC Architecture | Native Wasm-GC | JS Heap | JS Heap | JS Heap | Linear Memory / Manual Free |
| Hydration Tax | Zero (Direct Mount) | Full Tree Hydration | Signal Hydration | Signal Hydration | Bridge Serialization |
| AOT Reactive Plan | Bitmask Graph | None (Runtime) | Compiler Signals | Proxy Signals | N/A |
| Initial Mount Time | < 1.5 ms | 15 – 45 ms | 4 – 12 ms | 3 – 8 ms | 10 – 60 ms |
| Type-Safe TypeScript FFI | Automated .d.ts | Native | Native | Native | Manual wasm-bindgen |
| Command | Description | Example |
|---|---|---|
volt build <input> | Compile a .vt source file into a Wasm-GC module | volt build App.vt -o App.wasm --dts App.d.ts |
volt check <input> | Parse and validate syntax and reactive plans | volt check App.vt |
volt serve | Start local development server with Wasm MIME support | volt serve --port 8080 --dir ./dist |
Volt: High-Performance, Reactive Web Language Targeting Wasm-GC
Usage: volt <COMMAND>
Commands:
build Compile a .vt source file into a Wasm-GC module (.wasm)
check Parse and validate a .vt source file
serve Serve an interactive development directory with Wasm-GC support
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
WebAssembly Garbage Collection (Wasm-GC) is a standard extension to WebAssembly that introduces native heap types (struct, array, ref) managed directly by the host engine's garbage collector. Volt targets Wasm-GC to eliminate the need to ship a heavy runtime memory allocator or garbage collector in your binary, resulting in ultra-compact .wasm binaries (1–2 KB) with instant execution and zero serialization cost.
Traditional JavaScript frameworks parse component trees, allocate Virtual DOM structures, and run diffing algorithms before touching the DOM. Volt pre-calculates the linear creation sequence at compile time. During initialization (instance.exports.mount), the Wasm-GC engine executes a linear series of host DOM allocations directly in compiled machine code, completing full component mounting in under 1.5 milliseconds.
Volt runs on all modern browsers with Wasm-GC enabled:
Volt provides the extern "js" declaration block. When declared, the Volt compiler generates WebAssembly import entries for the requested functions. When building with the --dts flag, Volt generates TypeScript interfaces and function signatures for all exported signals, computeds, and methods.
MIT License. Copyright (c) 2026 bshea-1.
See LICENSE for full details.
2 commits
Rust
97.4%
JavaScript
2.6%
A compiled, reactive web language targeting WebAssembly Garbage Collection (Wasm-GC) with zero Virtual DOM, sub-millisecond mounting, and micro-footprint binaries.
See the codeA compiled, reactive web language targeting WebAssembly Garbage Collection (Wasm-GC) with zero Virtual DOM, sub-millisecond mounting, and micro-footprint binaries.
Live Demo | About | Why Volt? | Overview | Architecture | Language Specification | Getting Started | Comparison | CLI Reference | FAQ | License
[!TIP] Experience the performance difference live: voltdemo.vercel.app runs a high-scale 3D force-directed graph simulation compiled with Volt.
Volt is a purpose-built, statically typed programming language designed from the ground up for the next generation of high-performance web applications.
Historically, web developers have faced a fundamental compromise:
Volt eliminates this tradeoff by targeting standard WebAssembly Garbage Collection (Wasm-GC). By leveraging the host browser's native garbage collector and compiling declarative UI definitions directly into deterministic, bitmask-driven reactive dispatch tables, Volt delivers:
dom.setTextContent), making updates $O(1)$ without any tree diffing.| Challenge in Modern Web | Traditional Approach | The Volt Approach |
|---|---|---|
| Runtime Overhead | 45 KB+ JS runtime & framework core | < 1.5 KB micro-bootloader |
| Reactivity Cost | Runtime dependency tracking & VDOM diffing | Ahead-of-Time (AOT) bitmask dispatch graph |
| Memory Management | JS Garbage Collector thrashing with VDOM nodes | Native Wasm-GC structs integrated with host engine |
| DOM Interaction | Heavy synthetic events & tree traversal | Direct host pointer bindings & table funcrefs |
| Startup Performance | Parsing & executing multi-megabyte JS bundles | Instant streaming compilation & execution |
Volt (.vt) is a statically typed, expression-oriented language targeting WebAssembly Garbage-Collected (Wasm-GC) binary modules. It eliminates JavaScript hydration taxes and Virtual DOM overhead through direct host pointer bindings and fine-grained reactive update dispatch.
dom.setTextContent) with zero VDOM diffing or reconciliation passes.struct.new, struct.get, struct.set) managed seamlessly by host browser garbage collection..d.ts declaration files for compiled Wasm modules and supports type-safe extern "js" host function imports.<volt-app src="..."> custom element runtime under 1.5 KB (boot.js).Volt compiles high-level .vt declarative component definitions directly into standard WebAssembly GC bytecode via an ahead-of-time reactivity planning engine:
flowchart TD
Source[".vt Source File"] --> Lexer["Lexer / Tokenizer"]
Lexer --> Parser["Recursive Descent Parser"]
Parser --> AST["Abstract Syntax Tree (AST)"]
subgraph Analysis["Reactivity & Dependency Analysis"]
AST --> ReactivePlan["AOT Reactivity Analyzer"]
ReactivePlan --> SignalGraph["Signal Dependency Bitmasks"]
ReactivePlan --> DynamicSlots["Dynamic Text / Attr Slots"]
ReactivePlan --> ElementPlan["Linear DOM Creation Plan"]
end
subgraph Codegen["Wasm-GC Binary Emission"]
SignalGraph --> WasmCompiler["Wasm-GC Bytecode Compiler"]
DynamicSlots --> WasmCompiler
ElementPlan --> WasmCompiler
WasmCompiler --> WasmBinary[".wasm Binary (GC Structs + Dispatch Table)"]
WasmCompiler --> DtsEmitter[".d.ts TypeScript Declarations"]
end
subgraph Runtime["Browser Host Execution (< 1.5 KB Bootloader)"]
WasmBinary --> HostDOM["Direct DOM Updates (externref + dom.setTextNumber)"]
end
Every signal in a Volt component is mapped to a dedicated struct field in Wasm-GC memory with a corresponding bitmask flag:
$$\text{Dirty Mask} = \bigvee_{i \in \text{Modified}} (1 \ll \text{Signal ID}_i)$$
When an action mutates a signal, the component updates the struct field, applies bitwise masking across computed expressions and dynamic DOM text slots, and triggers surgical updates to the host DOM with zero tree walking.
Volt combines clean, concise syntax with explicit reactivity declarations:
extern "js" {
fn logMetric(event: string, value: i32);
}
export component Counter {
signal count: i32 = 0;
signal step: i32 = 1;
computed doubled: i32 = count * 2;
fn increment() {
count += step;
logMetric("count_updated", count);
}
fn reset() {
count = 0;
}
render {
<div class="counter-card">
<h2>"Volt Reactive Counter"</h2>
<p>"Current Value: " {count} " (Doubled: " {doubled} ")" </p>
<div class="actions">
<button @click=increment>"Increment"</button>
<button @click=reset>"Reset"</button>
</div>
</div>
}
}
signal <name>: <type> = <expr>;: Reactive state primitive mapped directly to Wasm-GC struct fields.computed <name>: <type> = <expr>;: Pure derived expression recalculated only when upstream signal bitmasks trip.extern "js" { ... }: Type-safe FFI interface allowing Volt components to call host JavaScript functions and browser APIs.fn <name>(<args>) { ... }: Component methods exposed to host DOM event listeners via WebAssembly Table funcref indices.render { <jsx> }: Declarative DOM structure compiled into a linear sequence of host DOM allocations and static text nodes.cargo)Clone the repository and build the release binary:
git clone https://github.com/bshea-1/volt.git
cd volt
cargo build --release
The compiled binary is available at ./target/release/volt.
Compile a .vt file into a WebAssembly GC module with companion TypeScript declarations:
volt build component.vt -o component.wasm --dts component.d.ts
Verify syntax, signal graphs, dynamic text slots, and reactive dependencies without emitting bytecode:
volt check component.vt
Mount the compiled component into any web page using the Volt micro-bootloader:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Volt App</title>
</head>
<body>
<!-- Declarative Volt Web Component -->
<volt-app src="./component.wasm"></volt-app>
<!-- Lightweight Micro-Bootloader (< 1.5 KB) -->
<script type="module" src="./boot.js"></script>
</body>
</html>
Start a development server with native WebAssembly MIME configurations:
volt serve --port 3000 --dir examples
| Feature | Volt (.vt) | React 19 | Svelte 5 | SolidJS | Traditional Wasm (Rust/C++) |
|---|---|---|---|---|---|
| Virtual DOM Overhead | None (0 B) | High (Full VDOM) | None | None | None |
| Runtime / Bootloader Size | < 1.5 KB | ~45 KB | ~15 KB | ~7 KB | 50 KB – 2 MB+ (Glue + Allocator) |
| GC Architecture | Native Wasm-GC | JS Heap | JS Heap | JS Heap | Linear Memory / Manual Free |
| Hydration Tax | Zero (Direct Mount) | Full Tree Hydration | Signal Hydration | Signal Hydration | Bridge Serialization |
| AOT Reactive Plan | Bitmask Graph | None (Runtime) | Compiler Signals | Proxy Signals | N/A |
| Initial Mount Time | < 1.5 ms | 15 – 45 ms | 4 – 12 ms | 3 – 8 ms | 10 – 60 ms |
| Type-Safe TypeScript FFI | Automated .d.ts | Native | Native | Native | Manual wasm-bindgen |
| Command | Description | Example |
|---|---|---|
volt build <input> | Compile a .vt source file into a Wasm-GC module | volt build App.vt -o App.wasm --dts App.d.ts |
volt check <input> | Parse and validate syntax and reactive plans | volt check App.vt |
volt serve | Start local development server with Wasm MIME support | volt serve --port 8080 --dir ./dist |
Volt: High-Performance, Reactive Web Language Targeting Wasm-GC
Usage: volt <COMMAND>
Commands:
build Compile a .vt source file into a Wasm-GC module (.wasm)
check Parse and validate a .vt source file
serve Serve an interactive development directory with Wasm-GC support
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
WebAssembly Garbage Collection (Wasm-GC) is a standard extension to WebAssembly that introduces native heap types (struct, array, ref) managed directly by the host engine's garbage collector. Volt targets Wasm-GC to eliminate the need to ship a heavy runtime memory allocator or garbage collector in your binary, resulting in ultra-compact .wasm binaries (1–2 KB) with instant execution and zero serialization cost.
Traditional JavaScript frameworks parse component trees, allocate Virtual DOM structures, and run diffing algorithms before touching the DOM. Volt pre-calculates the linear creation sequence at compile time. During initialization (instance.exports.mount), the Wasm-GC engine executes a linear series of host DOM allocations directly in compiled machine code, completing full component mounting in under 1.5 milliseconds.
Volt runs on all modern browsers with Wasm-GC enabled:
Volt provides the extern "js" declaration block. When declared, the Volt compiler generates WebAssembly import entries for the requested functions. When building with the --dts flag, Volt generates TypeScript interfaces and function signatures for all exported signals, computeds, and methods.
MIT License. Copyright (c) 2026 bshea-1.
See LICENSE for full details.
2 commits
Rust
97.4%
JavaScript
2.6%