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 including Chart).
  • velc/ — the DSL compiler. Parses .vel files 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

Read more