Cesium logo Cesium

Compiler and Toolchain

November 27, 2026

This section describes how the Cesium compiler is put together: its backends, how it bootstraps, the semantic IR every frontend lowers to, and the small language subset the first compiler stage accepts.

Info: Status

These pages summarize decision records kept as issues in cesiumlang/cesium. Stage 0 (cesium0) and cesium1, a compiler for S0 written in S0, are implemented and tested in CI on Linux, macOS and Windows with the QBE backend; the rest is a plan. Where a page and its decision record disagree, the decision record wins.

Pages

  • Architecture - Two backends behind a semantic IR, the toolchain, the runtime model and the target platforms
  • Bootstrap Chain - Stage 0 in portable C, cesium1 in S0, then the real compiler; what CI builds and what contributors download
  • Semantic IR (SIR) - The core level of the IR that every frontend lowers to
  • The S0 Subset - The tiny subset of Cesium that stage 0 compiles
  • Stage 0 C Dialect - The portable C subset stage 0 is written in
  • Freestanding Targets - What bare-metal targets require of the language, library and compiler
  • Diagnostics - The error codes of cesium0 and cesium1, each with what it means and how to fix it

Decision Records

RecordSubject
cesiumlang/cesium#4ADR 0001: compiler backend, LLVM packaging and toolchain
cesiumlang/cesium#5ADR 0002: bootstrap strategy and hosting the compiler
cesiumlang/cesium#6ADR 0003: freestanding targets
cesiumlang/cesium#7ADR 0004: two backends, QBE first and LLVM as the primary release backend
cesiumlang/cesium#8Design: Cesium semantic IR (SIR)
cesiumlang/cesium#9Design: stage 0 and the S0 subset
cesiumlang/cesium#10Design: stage 0 C dialect
cesiumlang/cesium#11Design: ownership, borrowing and lifetimes

Requirements carried over from the removed C++ prototype (documentation generator, command-line interface, logging) are in cesiumlang/cesium#64.

See also the language specification draft and the language reference.

Cesium 0.2.0, in development (dev at 53dc38a) · GitHub