What exactly is a Rust "toolchain"?

Viewed 4319

I've seen rustup be referred to as a "toolchain installer", but it's hard to find an exact definition of what Rust considers a "toolchain" to be and what the scope is for the concept.

I already have the Rust compiler and Cargo installed. What more does rustup bring? Is it just a Rust-version-switcher?


As a .NET-developer, maybe there is there a parallel which makes it easier for me to grasp this concept?

1 Answers

A toolchain is a specific version of the collection of programs needed to compile a Rust application. It includes, but is not limited to:

  • The compiler, rustc
  • The dependency manager and build tool, cargo
  • The documentation generator, rustdoc
  • The static and/or dynamic libraries comprising the standard library for the default platform

There are additional components that can be installed, such as

  • Documentation
    • The Rust Programming Language
    • The standard library
    • Various books and references
  • The static and/or dynamic libraries comprising the standard library for additional platforms to cross-compile to
  • The source code for the standard library
  • Extra utilities
    • Code formatting via rustfmt
    • Extra lints via clippy
    • Undefined behavior checking via miri
    • Advanced editor support via rust-analyzer or the Rust Language Server

Rustup provides ways to install, remove, update, select and otherwise manage these toolchains and their associated pieces.

See also:

Related