Welcome to Vel
A token-efficient, compile-to-native UI language with its own GPU rendering engine.
Vel is a declarative DSL with a reactive substrate, a from-scratch GPU 2D rendering engine, and first-class C/C++ interop. A small compiler (velc) parses .vel files, type-checks them against a primitive registry, and emits idiomatic modern C++ that links into libvel.
The goal: production-grade native UIs at the source-token density of Tailwind, with the rendering quality of Flutter, callable from any existing C/C++ codebase.
New: Vel now runs on macOS, Windows, and the web from one source, with a real in-browser playground, accessibility, and measured performance — 2.33× fewer tokens than React and ~65–93× faster layout relayout. See What’s New and Performance & Benchmarks.
A quick taste
use "backend/users.h"
#UserList
@users: std::vector<User> = await fetchUsers()
@filter = ""
V g=md p=lg
In placeholder="Search…" value=$filter
if $users.size() > 0
List of=$users as=u
when $u.name.contains($filter)
Card -> click => myapp::open(u.id)
H g=sm
Avatar src=$u.avatar
V
T $u.name font=bold
T $u.email fg=fgMuted
else
Spinner
That compiles to typed C++ that calls into libvel, with await fetchUsers() lowered to an AsyncSignal wired into the reactive substrate.
Three tiers, one direction
Vel splits its concerns into four top-level directories, each owning one layer of the stack:
engine/(Lume) — the GPU 2D rendering engine. Dawn/WebGPU, FreeType, analytic SDF shapes, glyph atlas. No framework types leak in.framework/— the reactive substrate:Signal<T>,Computed<T>,AsyncSignal<T>, the widget tree, layout primitives, event dispatcher, hot-reload.registry/— Vel UI, the opinionated component library. 44 baseline widgets built on the framework (now includingChart).velc/— the DSL compiler. Parses.velfiles and emits C++.
Dependency direction is strict and one-way: registry → framework → engine. The framework never reaches into a widget. The engine never knows what a widget is.
Start here
Quickstart
→Install Vel, write your first .vel file, run the showcase.
The .vel language
→Syntax, semantics, codegen, C/C++ interop.
Signals & reactivity
→How Signal, Computed, and AsyncSignal compose.
Lume — the engine
→The GPU 2D renderer behind every Vel pixel.
Read more
- Blog: From Skia to Lume: writing my own 2D rendering engine for Vel
- Source: github.com/chan27-2/Vel
- License: MIT