Toolchain

Toolchain Overview

How the v5.6 parser, checker, interpreter, backends, package tools, and editor surface fit together.

Topaz v5.6 is one checked toolchain with several consumers of the same resolved program. Parsing, whole-unit resolution, and static checking form the shared front door; execution and emission happen only after that door succeeds unless the user explicitly asks for an unchecked developer path.

Contract and components

The driver contains the parser and diagnostics, module resolver, type checker, reference interpreter, deterministic TestHost, boxed and native Rust lowerers, Python lowerer, web/web-worker builders, formatter, LSP, package resolver, documentation generator, migration and refactoring commands. The language SPEC defines source meaning; a backend may choose another representation only when observable behavior is preserved.

Workflow

Use check as the cheapest whole-unit gate, run for reference execution, test for the isolated TestHost, and build for a distributable target. emit exposes generated Rust for inspection. Package mode starts when an entry is omitted and topaz.toml is found under --root; --locked requires the lockfile to match before compilation.

Current support

The current tools report compiler and runtime 5.6.0 with language mode topaz-5.6. The interpreter, Rust, Python, package, and web paths all start from the same checked program.

Boundaries and limitations

Native build invokes the user's Rust tools; run, check, and emit do not require them. Web targets and the compiler playground are separate outputs. --unchecked is intended only for compiler investigation, not normal application builds.

Command reference

topaz check main.tpz
topaz run main.tpz
topaz build main.tpz --out-dir build
topaz version --verbose