How thatkj/rust works
This repository is Rust’s source tree: it includes the compiler, standard library, documentation, and tooling. The sampled compiler sources illuminate inference and trait-obligation handling, plus MIR pass management; they do not expose enough of rustc’s entry-point wiring to reconstruct a full user-to-binary pipeline. The graph therefore emphasizes evidenced internal relationships and preserves documented product areas without guessing their connections. Several broad capabilities are represented by their enclosing source directories because their implementations were not sampled.
Main entry points: mod.rs Inference context · pass_manager.rs MIR passes · traits/engine.rs Obligation engine · traits/engine.rs Trait selection
Components 14
Compiler core
- rustc entry
compiler/rustc/src/main.rs - Query execution
compiler/rustc_query_impl/src/execution.rs - MIR passes
compiler/rustc_mir_transform/src/pass_manager.rs - MIR validation
compiler/rustc_mir_transform/src/validate.rs
Type semantics
- Inference context
compiler/rustc_infer/src/infer/mod.rs - Obligation engine
compiler/rustc_infer/src/traits/engine.rs - Trait selection
compiler/rustc_trait_selection/src/traits/engine.rs
Rust products
- Standard library
library/std - Documentation tooling
src/librustdoc - Formatter
src/tools/rustfmt - Linter
src/tools/clippy - Editor support
src/tools/rust-analyzer - Package tooling
Other components
- Rust developer
Connections 10
- MIR passes → MIR validation: runs validation
compiler/rustc_mir_transform/src/pass_manager.rs - Obligation engine → Inference context: uses context
compiler/rustc_infer/src/traits/engine.rs - Trait selection → Inference context: registers obligations
compiler/rustc_trait_selection/src/traits/engine.rs - Rust developer → rustc entry: compiles with
README.md - Rust developer → Standard library: uses
README.md - Rust developer → Documentation tooling: generates docs
README.md - Rust developer → Formatter: formats with
README.md - Rust developer → Linter: lints with
README.md - Rust developer → Editor support: gets editor support
README.md - Rust developer → Package tooling: builds with
README.md