Language-agnostic template engine with Vue SFC syntax
Server-side HTML rendering · Signal-based client interactivity · WASM-powered
Features · Installation · Usage · Example · Architecture · Build
- Vue SFC Syntax — Write templates with familiar
<template>,<script setup>,<style scoped>blocks - Zero Node.js Dependency — Core written in Rust, compiles to WASM for backend integration
- Signal-based Reactivity — Lightweight client-side interactivity with direct DOM updates (~4KB runtime, no virtual DOM)
- Framework-agnostic — WASM compiler integrates with any backend via JSON stdin/stdout protocol
- Cross-platform — Pre-built WASM + native binaries for Linux x64/ARM64, macOS x64/ARM64, and Windows x64
One-line install (Linux / macOS):
curl -fsSL https://raw.githubusercontent.com/vanengine/van/main/install.sh | shManual download: grab the latest van-cli-* binary from GitHub Releases and place it in your PATH.
van init my-project # Scaffold a new Van project
van dev # Start dev server with hot reload
van generate # Static site generationVan compiles .van files to HTML via a WASM binary — integrate with any backend:
- Spring Boot — van-spring-boot-starter
See WASM Integration below for the raw JSON protocol.
<template>
<h1>{{ title }}</h1>
<button @click="count++">Clicked {{ count }} times</button>
</template>
<script setup>
let count = 0
</script>
<style scoped>
h1 { color: steelblue; }
</style>Server-side {{ title }} is interpolated by the host framework; count becomes a reactive signal with automatic DOM updates on the client.
.van file → [van-parser] → VanBlock
├── [van-compiler] → Server HTML with {{ expr }}
└── [van-signal-gen] → Signal-based JS (direct DOM ops)
Core Engine (crates/)
| Crate | Purpose |
|---|---|
van-parser |
Hand-written recursive descent parser for .van files |
van-compiler |
Orchestrates server HTML + client JS compilation |
van-compiler-wasi |
WASM entry point (JSON stdin/stdout protocol) |
van-signal-gen |
<script setup> → signal-based direct DOM JS |
CLI Toolchain (crates/van-cli/)
| Crate | Purpose |
|---|---|
van-cli |
CLI binary (van init, van dev, van generate) |
van-context |
Project context and configuration |
van-dev |
Dev server with hot reload |
van-init |
Project scaffolding |
Build from Source
Prerequisites: Rust toolchain (1.70+)
# Build all crates
cargo build --release
# Build CLI binary
cargo build --release -p van-cli
# Build WASM binary (for framework integration)
cargo build --target wasm32-wasip1 -p van-compiler-wasi --release
# Run tests
cargo testWASM Integration
The WASM compiler receives JSON via stdin and returns compiled HTML:
Two execution modes:
- Single-shot (default) — reads stdin, compiles once, writes response
- Daemon (
--daemon) — JSON Lines protocol, stays alive until stdin EOF
Host frameworks perform a second pass to interpolate {{ expr }} with server-side model data.
- van-spring-boot-starter — Spring Boot integration