rust-lang/rust
Glossary
A short reference for project-specific terms. The authoritative list lives in the rustc-dev-guide glossary; this page is a curated subset most contributors will hit early.
Compiler stages and pipelines
| Term | Meaning |
|---|---|
| Stage 0 | The pre-built downloaded compiler used to bootstrap. Pinned by src/stage0. |
| Stage 1 | The compiler built by stage 0. Used for local development. |
| Stage 2 | The compiler built by stage 1. Distributed in releases. |
| Sysroot | The directory containing a compiler's lib/, bin/, and rustlib/ — the standard library it links against. |
| Snapshot / beta | The previous stable Rust release used as stage 0; bumped by src/tools/bump-stage0. |
| Subtree / submodule | External-repo tools pulled in. Subtrees (clippy, miri, rustfmt, rustc-dev-guide) live in this repo via git subtree; submodules (cargo, rust-analyzer) are pinned commits. |
Intermediate representations
| Term | Meaning |
|---|---|
| Token tree | The output of the lexer (rustc_lexer) plus light grouping from the parser. |
| AST | Abstract Syntax Tree — produced by rustc_parse, defined in rustc_ast. Source-faithful, includes unexpanded macros. |
| HIR | High-level IR — produced by rustc_ast_lowering from the AST after macro expansion and name resolution. Stable target for type checking. Defined in rustc_hir. |
| THIR | Typed HIR — type-annotated tree built from HIR, used briefly during MIR construction. Defined in rustc_middle::thir. |
| MIR | Mid-level IR — control-flow-graph based IR used for borrow checking, optimization, and codegen. Defined in rustc_middle::mir. |
| LLVM IR | The output of the LLVM codegen backend, fed to LLVM proper. The Cranelift and GCC backends produce their own IRs instead. |
Type system
| Term | Meaning |
|---|---|
TyCtxt |
The type context — the central handle through which most compiler queries flow. Lives in rustc_middle::ty. |
DefId |
Stable identifier for a definition (function, type, module). Carries both crate index and intra-crate index. |
HirId |
Identifier for a node in HIR. |
| Substs / GenericArgs | The arguments to a generic — type, lifetime, and const args bundled together. |
| Trait obligation | A "this type implements this trait" claim that the trait solver tries to prove. |
| Trait solver | The engine in rustc_trait_selection (and the experimental rustc_next_trait_solver) that proves obligations. |
| NLL | Non-Lexical Lifetimes — the borrow checker's region inference (now the default; the term survives in tests under tests/nll/). |
| Polonius | An experimental Datalog-based reformulation of NLL. |
Compilation infrastructure
| Term | Meaning |
|---|---|
| Query | A demand-driven computation registered in rustc_middle::query and executed by rustc_query_impl. The basis of incremental compilation. |
| Incr. comp. | Incremental compilation — the on-disk cache of query results stored in target/.../incremental/. |
Crate metadata (.rmeta) |
Serialized HIR/types/etc. for a dependency crate, read by rustc_metadata. |
| Codegen unit (CGU) | A unit of LLVM-level work; rustc partitions monomorphized items into CGUs that are compiled in parallel. |
| Monomorphization | The process of instantiating each generic at every concrete type it's used with, performed by rustc_monomorphize. |
| CTFE | Compile-Time Function Evaluation — the MIR interpreter in rustc_const_eval. Powers const fn, const, and patterns. |
| Miri | The same MIR interpreter used as a standalone undefined-behavior checker (src/tools/miri/). |
Project workflow
| Term | Meaning |
|---|---|
| bors / homu / rust-bors | The merge queue bot. Only it merges to main. Triggered by @bors r+. |
| Try build | A no-merge full CI run on a PR (@bors try), used to gather artifacts for perf runs. |
| Crater | The ecosystem-impact tool that compiles every crate on crates.io with a candidate compiler. |
| rustc-perf | The performance tracker; CI runs benchmarks against try builds. |
| Beta crater run / beta backport | A nominated PR for inclusion in the beta release. Driven by labels in triagebot.toml. |
| FCP | Final Comment Period — the team-driven approval phase before stabilizing or accepting a feature. |
| Tidy | The repo-wide lint (src/tools/tidy/). Catches license-header issues, alphabetical-order violations, oversized files, banned patterns, etc. |
| Compiletest | The test harness (src/tools/compiletest/) that drives the tests/ directory. |
| UI test | A test under tests/ui/ that compares compiler stdout/stderr against expected .stderr / .stdout files. |
| Run-make test | A test under tests/run-make/ driven by a Rust support library (src/tools/run-make-support/). |
--bless |
Tell compiletest to overwrite the expected output files with the current actual output. |
Editions and release channels
| Term | Meaning |
|---|---|
| Edition | Opt-in language updates (2015, 2018, 2021, 2024, …). Crate-level setting. |
| Channel | nightly (every day from main), beta (frozen 6 weeks), stable (frozen 6 weeks). The cadence is the "release train". |
| Stage0 channel | The channel of the downloaded bootstrap compiler — usually beta. Stored in src/ci/channel. |
| Tier | Platform support tier. Tier 1 has full automated test coverage and binary distribution; tier 2 has builds; tier 3 is best-effort. |
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.