Skip to content

Topaz v5.2.0 — First public release

Latest

Choose a tag to compare

@github-actions github-actions released this 16 Jun 01:20
· 4 commits to main since this release

Topaz v5.2.0 — First public release

Topaz v5.2 is the first public release of the Topaz language and compiler: a small, closed, Unicode-first application language that reads like Python or TypeScript and emits Rust.

Rust is the substrate. Topaz is the surface. You write the intent; the compiler writes the Rust.

1. What is Topaz?

A small, closed language for application intent — CLI tools, data transformation, backend glue, config logic, SQL/shell/path orchestration. For each intent there is exactly one canonical form, locked in the v5.2 specification, written by people and by agents and checked by the toolchain. Its competitors are Python and TypeScript, not Rust: it reads like them, but it is static, single-canonical-form, Unicode-first, and it lowers to a native deployable. Full positioning: docs/PHILOSOPHY.md. Canonical docs: topaz.ooo.

2. What does it compile to?

Native Rust. topaz run executes through the reference interpreter; topaz build lowers a program to Rust and compiles a self-contained native binary — offline, from a runtime closure the compiler carries itself, with no Topaz runtime to install on the target. The toolchain is pure Rust with zero external (crates.io) dependencies and forbid(unsafe_code) across the workspace.

3. What is implemented today?

The v5.2 language, end to end:

  • A Unicode-first lexer + layout normalizer, full parser, and multi-file module resolver.
  • A whole-unit static type checker (topaz check).
  • The reference interpreter (topaz run) — pattern matching, defer, concurrent, faults rendered with source carets.
  • A Rust emission backend (topaz emit / topaz build) — self/mutual recursion, closures, the six call ABIs, records, typed templates, all of it.

4. How is correctness evidenced?

Evidence-first, not assertion:

  • A golden corpus: every specification example and documentation snippet in three locales (parse-checked), a layout-conformance suite, negative suites pinning the stable diagnostic codes, the v5.2 module fixtures, and executable transcripts.
  • A differential harness: emission fixtures run through BOTH engines (interpreter and the compiled Rust) and must agree by construction.
  • CI on Linux, macOS, and Windows, including a binary-only topaz build smoke that proves a source-free user can build and run on each OS.
  • cargo test --workspace (635 tests), clippy -D warnings, fmt --check, and the corpus gates — all green.

5. Where should I look first?

  • README.md — the five-minute tour.
  • examples/ — small runnable programs (each parses, type-checks, runs, and topaz builds).
  • docs/design/ — the Compiler Design Record ledger (CDR-001…006): the architecture, decision by decision.
  • crates/topaz_emit — the Rust emission backend; crates/topaz_difftest — how the two engines are held in agreement.

Provenance

Topaz was developed in private incubation and imported publicly as a curated source release. We do not publish private prompts, agent orchestration logs, scratch branches, or internal review traces. The public artifact is the compiler source, tests, fixtures, design records, generated-artifact checks, and release pipeline. Earlier internal design generations are preserved as provenance; the first public release artifact is v5.2.0.

Non-goals

No "easy Rust", no "Rust killer", no benchmarks at debut. Topaz is correctness-first; optimized lowering, broader distribution, and the deferred v5 surface items (grapheme APIs, per-domain template rendering) are tracked openly on topaz.ooo.