Open-Source Wikis

/

Rust

/

Tools

rust-lang/rust

Tools

The src/tools/ directory plus src/bootstrap/ and src/librustdoc/ hold every tool shipped with rustup (rustdoc, miri, clippy, rustfmt, rust-analyzer) plus dozens of internal helpers used to build, test, document, and ship rustc. Most of the major tools are vendored from external repositories as git subtrees; this page describes them at a glance and links to dedicated pages where one exists.

Pages in this section

  • Bootstrapx.py and the src/bootstrap/ Rust binary that drives all builds
  • rustdoccargo doc's engine; HTML/JSON documentation
  • Compiletest — the tests/ test runner
  • Other tools — miri, clippy, rustfmt, rust-analyzer, tidy, and the long tail

Tool categories

Tools shipped to users

These are part of every standard rustup installation:

Tool Lives in Repo of record
rustc compiler/ (binary in compiler/rustc/) rust-lang/rust
rustdoc src/librustdoc/ + src/tools/rustdoc/ rust-lang/rust
cargo submodule rust-lang/cargo
clippy-driver / cargo-clippy src/tools/clippy/ (subtree) rust-lang/rust-clippy
rustfmt / cargo-fmt src/tools/rustfmt/ (subtree) rust-lang/rustfmt
rust-analyzer src/tools/rust-analyzer/ (submodule) rust-lang/rust-analyzer
miri (rustup component) src/tools/miri/ (subtree) rust-lang/miri

Tools used during the build

Not shipped to users; needed to build rustc + library + tools:

Tool Purpose
src/bootstrap/ The x.py Rust binary that drives Cargo
src/build_helper/ Shared helpers used by bootstrap and tools
src/tools/x/ Standalone "x" launcher (a tiny wrapper)
src/tools/build-manifest/ Generates release manifests for rustup
src/tools/bump-stage0/ Bumps the pinned beta toolchain
src/tools/replace-version-placeholder/ Substitutes version strings at release-cut
src/tools/rust-installer/ Builds rustup-compatible installers
src/tools/lld-wrapper/ Thin wrapper used to invoke bundled lld
src/tools/wasm-component-ld/ wasm-component linking shim
src/tools/llvm-bitcode-linker/ Custom bitcode linker for LTO

Tools used during testing

Tool Purpose
src/tools/compiletest/ Drives the tests/ suites
src/tools/run-make-support/ Helper library for tests/run-make/
src/tools/tidy/ Repo-wide lint
src/tools/jsondocck/ Assertions for rustdoc JSON tests
src/tools/jsondoclint/ Validate rustdoc JSON output
src/tools/html-checker/ HTML validation for rustdoc HTML
src/tools/linkchecker/ Find broken links in built docs
src/tools/cargotest/ Test that user crates still compile
src/tools/coverage-dump/ Decode coverage data for tests
src/tools/miropt-test-tools/ Helpers for tests/mir-opt/
src/tools/rustdoc-themes/ Verify rustdoc CSS themes
src/tools/rustdoc-gui-test/ Drive rustdoc GUI tests
src/tools/test-float-parse/ Stress-test float parsing
src/tools/lint-docs/ Check the lint reference docs
src/tools/tier-check/ Verify platform-tier policies
src/tools/libcxx-version/ Check libcxx version on macOS CI

Tools for documentation

Tool Purpose
src/tools/rustbook/ Wrapper around mdBook used for all the books
src/tools/error_index_generator/ Builds the rustc error index
src/tools/unstable-book-gen/ Generates the unstable book from rustc_feature
src/tools/unicode-table-generator/ Regenerates Unicode tables in core
src/tools/generate-copyright/ Produces COPYRIGHT-thirdparty.md
src/tools/collect-license-metadata/ Collects license info
src/tools/features-status-dump/ Dump feature status JSON
src/tools/generate-windows-sys/ Regenerates Windows API bindings used by std

Tools for cross-compilation testing

Tool Purpose
src/tools/remote-test-client/ Runs tests on a remote target
src/tools/remote-test-server/ The matching server on the device
src/tools/opt-dist/ PGO/BOLT optimization driver for releases

Subtree / submodule tools

These are entire other projects vendored into this repo:

Tool Type Repo of record
clippy subtree rust-lang/rust-clippy
miri subtree rust-lang/miri
rustfmt subtree rust-lang/rustfmt
rust-analyzer submodule rust-lang/rust-analyzer
cargo submodule rust-lang/cargo
rustc-perf submodule rust-lang/rustc-perf
enzyme submodule EnzymeAD/Enzyme

Why so many tools

Different tools solve different parts of the "ship a Rust compiler" problem:

  • rustc + std are the actual deliverable
  • rustdoc, clippy, rustfmt, miri, rust-analyzer are user-facing dev tools that ship with rustup
  • bootstrap, tidy, compiletest are internal tools required to build and test the deliverable
  • build-manifest, bump-stage0, generate-copyright are release-cut tooling
  • rustbook + mdBook are documentation tooling
  • opt-dist, llvm-bitcode-linker are release-time optimization tooling

This division explains why src/tools/ has nearly 50 entries — most of them are small Rust binaries with a single, focused job.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

Tools – Rust wiki | Factory