Developer preview. Vela, Facet, and Quire are pre-release and in active development — syntax, APIs, and availability may change, and they are not yet generally available.
SStretch Dev Docs
Vela

Self-hosting & Compiler Overview

The roadmap from the Rust seed interpreter to a Vela compiler written in Vela.

.sources/vela/design/SELF_HOSTING_ROADMAP.md is explicit: Vela is pre-release, the Stage-0 seed interpreter is written in Rust, and the goal is to write the real compiler in Vela, then pin the bootstrap and delete the seed.

1. Current status in the source

The roadmap states that, as of 2026-06-21, the Stage-0 seed is built and working, with a small Rust codebase and green tests. It also points to Vela examples that already implement compiler-shaped pieces.

2. Compiler-shaped examples already written in Vela

tokenizer.vela is a lexer for arithmetic expressions. It demonstrates records, tagged unions, match, loops, and string builtins working together.

# Source: .sources/vela/examples/tokenizer.vela
type Token:
    Number(value)
    Plus
    Minus
    Times
    Divide
    LParen
    RParen
    Unknown(ch)

fn is_digit(c):
    return c >= "0" and c <= "9"

fn classify(c):
    match c:
        "+" => Plus
        "-" => Minus
        "*" => Times
        "/" => Divide
        "(" => LParen
        ")" => RParen
        _ => Unknown(c)

The roadmap also calls out calculator.vela as a fuller lexer, recursive-descent parser, and evaluator pipeline.

3. Target pipeline

The planned compiler pipeline is:

source (.vela)
  -> lexer
  -> parser
  -> typed AST/HIR
  -> Vela MIR
  -> interpreter, native codegen, WASM codegen, or optional LLVM-backed optimized codegen

The roadmap distinguishes a self-hosted interpreter milestone from later native/WASM code generation. The first self-hosted artifact does not need full codegen.

4. Bootstrap stages

  • Stage-0: current Rust seed interpreter.
  • Stage-1: grow the seed and language to the subset needed for self-hosting.
  • Stage-2a: velac written in Vela, initially targeting a tree-walking interpreter.
  • Stage-2b: velac gains MIR and native/WASM codegen.
  • Stage-3: seed deleted; Vela builds Vela from a pinned previous release.

5. Seed gaps called out by the roadmap

The roadmap lists blockers before velac can be written comfortably:

  • modules/imports for multi-file compiler code,
  • multi-argument lambdas,
  • ergonomic error values and propagation,
  • efficient growable collections,
  • more string-building and parsing helpers.

These are roadmap items, not a claim that the current seed already has a full production compiler toolchain.

6. Verification strategy

The roadmap emphasizes conformance tests, golden files, differential testing against the seed, self-ingestion, and reproducible builds. The seed is treated as an oracle for specified Stage-0 behavior while the Vela-written compiler is built incrementally.