Components
Each toolchain has several βcomponentsβ, some of which are required (like
rustc) and some that are optional (like clippy). The rustup component command is used to manage the installed components. For example,
run rustup component list to see a list of available and installed
components.
Components can be added when installing a toolchain with the --component
flag. For example:
rustup toolchain install nightly --component rust-docs
Components can be added to an already-installed toolchain with the rustup component command:
rustup component add rust-docs
To make it easier to choose which components are installed, rustup has the
concept of βprofilesβ which provide named groupings of different components.
See the Profiles chapter for more detail.
Most components have a target-tuple suffix, such as
rustc-x86_64-apple-darwin, to signify the platform the component is for.
The set of available components may vary with different releases and toolchains. The following is an overview of the different components:
rustcβ The Rust compiler and Rustdoc.cargoβ Cargo is a package manager and build tool.rustfmtβ Rustfmt is a tool for automatically formatting code.rust-stdβ This is the Rust standard library. There is a separaterust-stdcomponent for each target thatrustcsupports, such asrust-std-x86_64-pc-windows-msvc. See the Cross-compilation chapter for more detail.rust-docsβ This is a local copy of the Rust documentation. Use therustup doccommand to open the documentation in a web browser. Runrustup doc --helpfor more options.rust-analyzerβ rust-analyzer is a language server that provides support for editors and IDEs.clippyβ Clippy is a lint tool that provides extra checks for common mistakes and stylistic choices.miriβ Miri is an experimental Rust interpreter, which can be used for checking for undefined-behavior.rust-srcβ This is a local copy of the source code of the Rust standard library. This can be used by some tools, such as rust-analyzer, to provide auto-completion for functions within the standard library; Miri which is a Rust interpreter; and Cargoβs experimental build-std feature, which allows you to rebuild the standard library locally.rust-mingwβ This contains a linker and platform libraries for building on thex86_64-pc-windows-gnuplatform.llvm-toolsβ This component contains a collection of LLVM tools. This component has not been stabilized and may change in the future and is provided as-is. Availability of individual LLVM tools may change over LLVM versions (including removal of specific LLVM tools), and is not subject to compiler or toolchain stability guarantees. See #85658.rustc-devβ This component contains the compiler as a library. Most users will not need this; it is only needed for development of tools that link to the compiler, such as making modifications to Clippy.enzymeβ This component enables thestd::autodiffmodule in nightly Rust. See autodiff for more detail.
Previous components
See here for the latest version of this section.
These components have been deprecated and are not published in new Rust releases.
rlsβ RLS is a language server that is deprecated and has been replaced by rust-analyzer.rust-analysisβ Metadata about the standard library, used by RLS.- The
wasm32-wasitarget β It has been renamed towasm32-wasip1.
Component availability
Not all components are available for all toolchains. Especially on the nightly channel, some components may not be included if they are in a broken state. The current status of all the components may be found on the rustup components history page. See the Nightly availability section for more details.