1. 关于
  2. 1. Part 1: 构建,调试和向rustc贡献代码
    ❱
    1. 1.1. About the compiler team
    2. 1.2. 如何构建并运行编译器
      ❱
      1. 1.2.1. 推荐的工作流程
      2. 1.2.2. 编译器自举
      3. 1.2.3. Distribution artifacts
      4. 1.2.4. Documenting Compiler
      5. 1.2.5. ctags
    3. 1.3. The compiler testing framework
      ❱
      1. 1.3.1. Running tests
      2. 1.3.2. Adding new tests
      3. 1.3.3. Using compiletest + commands to control test execution
    4. 1.4. Walkthrough: a typical contribution
    5. 1.5. Bug Fix Procedure
    6. 1.6. Implementing new features
    7. 1.7. Stability attributes
    8. 1.8. Stabilizing Features
    9. 1.9. Debugging the Compiler
    10. 1.10. Profiling the compiler
      ❱
      1. 1.10.1. with the linux perf tool
    11. 1.11. Coding conventions
    12. 1.12. crates.io Dependencies
    13. 1.13. Emitting Errors and other Diagnostics
      ❱
      1. 1.13.1. LintStore
      2. 1.13.2. Diagnostic Codes
    14. 1.14. ICE-breaker teams
      ❱
      1. 1.14.1. "Cleanup Crew" ICE-breakers
      2. 1.14.2. LLVM ICE-breakers
    15. 1.15. Licenses
  3. 2. Part 2: 高层编译器架构
    ❱
    1. 2.1. Overview of the Compiler
    2. 2.2. 编译器源码结构
    3. 2.3. 查询:需求驱动的编译
      ❱
      1. 2.3.1. 查询求值模型的详细介绍
      2. 2.3.2. Incremental compilation
      3. 2.3.3. Incremental compilation In Detail
      4. 2.3.4. Debugging and Testing
      5. 2.3.5. Profiling Queries
      6. 2.3.6. Salsa
    4. 2.4. Memory Management in Rustc
  4. 3. Part 3: 源代码的不同表示
    ❱
    1. 3.1. The Rustc Driver and Interface
      ❱
      1. 3.1.1. Rustdoc
      2. 3.1.2. Ex: Type checking through rustc_interface
    2. 3.2. 符号与AST
      ❱
      1. 3.2.1. 词法分析与文法分析
      2. 3.2.2. #[test] Implementation
      3. 3.2.3. Panic Implementation
      4. 3.2.4. Macro expansion
      5. 3.2.5. Name resolution
      6. 3.2.6. AST Validation
      7. 3.2.7. Feature Gate Checking
    3. 3.3. HIR (高层IR)
      ❱
      1. 3.3.1. 将AST lower 到 HIR
      2. 3.3.2. Debugging
    4. 3.4. MIR (中层IR)
      ❱
      1. 3.4.1. HAIR 与 MIR 的构造
      2. 3.4.2. MIR 访问者与遍历
      3. 3.4.3. MIR passes: 为一个函数获取MIR
    5. 3.5. Closure expansion
  5. 4. Part 4: 分析
    ❱
    1. 4.1. ty 模块:类型的表示
      ❱
      1. 4.1.1. 范型和替换
      2. 4.1.2. TypeFolder and TypeFoldable
      3. 4.1.3. Generic arguments
    2. 4.2. Type inference
    3. 4.3. Trait solving (old-style)
      ❱
      1. 4.3.1. Higher-ranked trait bounds
      2. 4.3.2. Caching subtleties
      3. 4.3.3. Specialization
    4. 4.4. Trait solving (new-style)
      ❱
      1. 4.4.1. Lowering to logic
        ❱
        1. 4.4.1.1. Goals and clauses
        2. 4.4.1.2. Equality and associated types
        3. 4.4.1.3. Implied bounds
        4. 4.4.1.4. Region constraints
        5. 4.4.1.5. The lowering module in rustc
        6. 4.4.1.6. Lowering rules
        7. 4.4.1.7. Well-formedness checking
      2. 4.4.2. Canonical queries
        ❱
        1. 4.4.2.1. Canonicalization
      3. 4.4.3. The SLG solver
      4. 4.4.4. An Overview of Chalk
      5. 4.4.5. Bibliography
    5. 4.5. Type checking
      ❱
      1. 4.5.1. Method Lookup
      2. 4.5.2. Variance
      3. 4.5.3. Opaque Types
    6. 4.6. Pattern and Exhaustiveness Checking
    7. 4.7. The borrow checker
      ❱
      1. 4.7.1. Tracking moves and initialization
        ❱
        1. 4.7.1.1. Move paths
      2. 4.7.2. MIR type checker
      3. 4.7.3. Region inference
        ❱
        1. 4.7.3.1. Constraint propagation
        2. 4.7.3.2. Lifetime parameters
        3. 4.7.3.3. Member constraints
        4. 4.7.3.4. Placeholders and universes
        5. 4.7.3.5. Closure constraints
        6. 4.7.3.6. Error reporting
      4. 4.7.4. Two-phase-borrows
    8. 4.8. Parameter Environments
  6. 5. Part 5: From MIR to binaries
    ❱
    1. 5.1. The MIR (Mid-level IR)
      ❱
      1. 5.1.1. MIR optimizations
      2. 5.1.2. Debugging
    2. 5.2. Constant evaluation
      ❱
      1. 5.2.1. miri const evaluator
    3. 5.3. Monomorphization
    4. 5.4. Lowering MIR
    5. 5.5. Code Generation
      ❱
      1. 5.5.1. Updating LLVM
      2. 5.5.2. Debugging LLVM
      3. 5.5.3. Backend Agnostic Codegen
      4. 5.5.4. Implicit Caller Location
    6. 5.6. Profile-guided Optimization
    7. 5.7. Sanitizers Support
    8. 5.8. Debugging Support in Rust Compiler
  7. Appendix A: Background material
  8. Appendix B: Glossary
  9. Appendix C: Code Index
  10. Appendix D: Compiler Lecture Series
  11. Appendix E: Bibliography
  12. Appendix Z: HumorRust

Guide to Rustc Development

Humor in Rust

What's a project without a sense of humor? And frankly some of these are enlightening?

  • Weird exprs test
  • Ferris Rap
  • The Genesis of Generic Germination
  • The Bastion of the Turbofish test
  • Rust Koans
  • break rust;
  • The Nomicon Intro
  • rustc-ty renaming punfest