Snapshotmain · 67854e5
How rustc turns source text into checked MIR, optimized machine code, and a linked program.
Click a building or route
System map8 components · 7 connections
130%
Connections
BuildingsEntryServiceComputeStorageRuntimeToolingExternal
Terms, in plain English
ASTAbstract Syntax Tree: a tree that closely represents the grammar and written structure of source code.
How to study this repo
- 1Track one expression
Pick a small Rust expression and identify how its AST shape is simplified in HIR before type checking.
- 2Draw one MIR body
Compile with MIR output enabled, then label its basic blocks, terminators, moves, and drops using rustc_mir_build as a guide.
- 3Connect safety to codegen
Trace why borrow checking happens on MIR before optimization, then follow the verified body toward LLVM and the linker.