Crates
The compiler is organized around symbols: a definition has a stable identity,
and its signature, members, or body are computed when requested. The crate
subchapters expose that architecture as searchable .sage declarations,
operations, and dependency envelopes. Open Rust source on an entity to
inspect its corresponding implementation.
Following a compilation
Start with module parsing and expansion, then follow symbols to their signature and body operations. Checking introduces the computation-local contexts that resolve names, infer types, and solve trait goals. These are demand boundaries: requesting one body need not compute every body in a crate.
Semantic values and storage
Types and checked results describe the semantic values passed between operations. The Stash storage model explains how those values are owned. External metadata supplies facts about dependency definitions.
Understanding and checking results
The Semantic Inspector exposes compiler products for exploration. The oracle harness compares Sage with independently emitted rustc results. Their command-line usage is covered in the User's Guide.
The inline compilation tests keep source fixtures, type and symbol observations, diagnostics, and query expectations inside ordinary annotated Cargo tests. Its RFD explains the design.
The specification tooling checks the correspondence between this model, named specification rules, and Rust code and tests. The Anchors chapter gathers those rules and their implementation and test status. Worked examples provide concrete programs to follow through the compiler.