Cesium logo Cesium

The Cesium Language Specification

November 24, 2026

This is the normative definition of Cesium: what a compiler or a tool is checked against. The language reference explains Cesium by example. This specification is the technical document behind it, and where the two disagree, this one is meant to win once its rules are final.

Nothing here is final yet. Every rule starts as draft and becomes final only through an accepted proposal (P-0000).

How it is written

The specification is Markdown, one chapter per file, read by Skein. A rule is a paragraph or a list entry that starts with a marker. The marker gives the rule’s ID, its category and its status, and links it to the proposal that introduced it:

%rule[lex.comment.line syntax draft introduced-by=P-0000] A line comment starts with `//` and ends at the end of the line.
  • The ID says what the rule is about, and never changes. A rule that is dropped keeps its ID, with the status removed.
  • The category is one of syntax (the form of the source), legality (what the compiler must reject), static (meaning fixed at compile time) and dynamic (behavior at run time), as in the Ferrocene Language Specification.
  • The status is draft (written down, not accepted), final (accepted through a proposal), deprecated or removed.
  • Parts: a list entry with its own marker inside a rule is a part of that rule, with the rule’s ID and its own name: lex.keywords.types.
  • References: a rule names another rule as %[lex.ident].
  • Examples: a code block whose opening line carries %example is a tested example of the rule it is in. Its category, accepts or rejects, says whether a compiler must accept it.

Text without a marker is narrative: it explains and decides nothing.

Where a draft rule comes from

Each draft rule ends with its source, so a reader can tell how firm it is:

SourceMeaning
Decided in an issueA decision issue of cesiumlang/cesium (cesiumlang/cesium#4 to #11, #14), or the reference where it records one. Waiting to be carried by a proposal.
Direction in an issue, with its dateAn answer emanspeaks gave on a design issue (2026-11-22 to 24). A direction, not a decision: a proposal carries it later.
By useWhat every example in the reference and the S0 design does, with no record behind it.
ProvisionalA recommendation of the specification’s editors, not a direction. Replaced by whatever is decided.

What is still open is stated as an Open point in narrative, with the issue that tracks it, and no rule.

Grammar notation

Grammars are EBNF:

NotationMeaning
name = ... ;A production
"text"A terminal: the characters as written
a ba followed by b
a | ba or b
[ a ]An optional a
{ a }Zero or more a
( a )Grouping
(* ... *)A comment

Chapters

ChapterCoversStatus
Lexical structureSource files, tokens, comments, identifiers, keywords, literals, operatorsDraft
The S0 subsetThe grammar and rules of S0, the language of stage 0Draft
Types, expressions, statements, declarations, ownershipThe full languageNot written; in the reference and the design issues of cesiumlang/cesium

Conformance levels

conf.levels (static, draft) The bootstrap chain defines nested levels of the language. Each compiler accepts its level and every level below it. Decided in #9:

LevelDefined byAccepted by
S0The S0 subsetStage 0 (cesium0) and every later compiler
S1Not writtencesium1 and every later compiler
FullThe whole specificationThe real compiler

conf.subset (static, draft) Each level is a strict subset of the next: a program of one level is a program of every higher level, with the same meaning. Decided in #9, rule 1.

Open: the S1 feature list (#76); which features of the full language are core, planned or unproven (#58).

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