Repository navigation
Compiler Developer Notes
0x4171341 edited this page Jul 24, 2026
·
1 revision
This page is for contributors working inside the Rust compiler implementation.
| File | Purpose |
|---|---|
src/frontend/lexer.rs |
tokens, literals, indentation |
src/frontend/parser.rs |
recursive descent parser |
src/frontend/ast.rs |
AST definitions |
src/analysis/semantic.rs |
scopes and binding resolution |
src/analysis/typecheck.rs |
type table and inference |
src/analysis/escape.rs |
ownership / escape analysis |
src/mir/lower.rs |
AST to MIR lowering |
src/mir/pass_*.rs |
MIR optimizations |
src/backend/cranelift/lower.rs |
MIR to Cranelift |
src/bin/lpp-link.rs |
direct linker |
src/builtins.rs |
builtin signatures |
Language features usually touch:
- AST
- lexer/parser
- semantic analysis
- type checker
- MIR lowering
- Cranelift lowering only if a new operator or primitive operation is introduced
They should not touch lpp-link unless the executable format itself changes.
New builtins usually touch:
src/builtins.rs- host runtime implementation
- freestanding runtime implementation if direct linker support is required
For documentation examples, use a clean directory and run:
target/release/lpp --checkallDo not use repo-wide --checkall as a documentation gate unless old negative/scratch files are excluded.