Tools & Execution

Toolchain Overview

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

Topaz 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 interpreter, Rust, Python, package, Web, and bounded HTTP service paths all start from the same checked program. Use topaz version --verbose when an exact installed identity matters.

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