rust-lang/rust
The Rust Programming Language
This is the main source code repository for Rust. It contains the rustc compiler, the standard library (std, core, alloc, proc_macro, and friends), rustdoc, the bootstrap build system, the compiletest-based test suite, and a long list of subtree tools (miri, clippy, rustfmt, rust-analyzer, etc.). The repository is the canonical home of the language's reference implementation and ships every nightly, beta, and stable Rust release.
What lives here
The repository is structured around four top-level directories that each form a major area:
compiler/— the rustc compiler crates (~70rustc_*crates)library/— the Rust standard library and surrounding runtime crates (core,alloc,std,proc_macro,panic_unwind,compiler-builtins, etc.)src/— the bootstrap build system, rustdoc, documentation, and subtree tools (src/tools/)tests/— the language test suite, run by thecompiletestharness
Build, test, and ship orchestration is done by x.py (a thin wrapper around src/bootstrap/) which manages the multi-stage bootstrap process — using a downloaded "stage 0" compiler to build the stage 1 compiler, then using stage 1 to build the stage 2 (final) compiler.
Where to start
| You want to... | Read |
|---|---|
| Install Rust as a user | rust-lang.org/learn/get-started |
| Build the compiler from source | Getting started, INSTALL.md |
| Understand how rustc is structured | Architecture |
| Learn the project's vocabulary (HIR, MIR, query, …) | Glossary |
| Contribute a fix or feature | How to contribute |
| Find the deeper compiler dev manual | rustc-dev-guide |
| Browse the standard library | Library packages |
| Read about a specific compiler crate | Compiler systems |
Project size at a glance
A snapshot taken from the current checkout (commit f53b654a888):
- ~70
rustc_*crates undercompiler/ - ~25 crates under
library/(standard library, runtime, test infrastructure) - ~50 subtree tools under
src/tools/(rustdoc, miri, clippy, rustfmt, rust-analyzer, tidy, compiletest, …) - 25,000+ test files under
tests/driven bycompiletest - ~9,000 Rust source files in compiler + library + tools combined
For a richer breakdown see By the numbers.
Governance and contribution model
Rust is governed by the Rust project teams — T-compiler, T-libs, T-lang, T-types, T-bootstrap, T-rustdoc, etc. — and the day-to-day workflow is heavily automated:
- bors /
homu/rust-borsmerges PRs only after a full CI run, ensuringmainstays green triagebotassigns reviewers, applies labels, and routes nominations (configured intriagebot.toml)rustbotissuesrollups of small PRs- subtree tools (clippy, miri, rustfmt, rust-analyzer) live in their own repos and are pulled in via
git subtree
See How to contribute and the upstream rustc-dev-guide for the full workflow.
License
Rust is dual-licensed under MIT and Apache-2.0, with portions covered by other BSD-style licenses listed in COPYRIGHT.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.