~/talk

(Almost) Everything You Should Know About The Compiler Frontend

Talkat RustWeek 2025 · 2025-05-13..05-17· [rust, compilers-and-language-design]
slides:none on file

Rustc’s frontend walks source through parsing, macro expansion, resolution, HIR lowering, and finally MIR where borrow checking and codegen-ready transforms run. The query system caches expensive results, supports incremental compilation and on‑demand recomputation. The pipeline assigns def IDs, lowers syntactic sugar into HIR and then into middle/mir forms, uses inference contexts and obligation queues with probe/rollback for method selection, and rechecks lifetimes on MIR to produce precise NLL diagnostics.

AI-written summary · about

  1. 0:00Compiler frontend intro
  2. 1:29Talk overview and phases
  3. 3:36Parsing and entry points
  4. 7:49Macro expansion process
  5. 10:41Late identifier resolution
  6. 14:11Query system and incremental
  7. 19:06HIR lowering and type prep
  8. 25:02Lifetime resolution and MIR
  9. 28:40Type inference contexts
  10. 39:07Function and expression types
  11. 48:37MIR lowering and borrow check
  12. 55:39Final phases and Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.