Section: Components

Install rust-src

bash
bash
rustup component add rust-src
Explanation

Needed by some IDEs, tools, and advanced workflows.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Components
List components
Show installed and available components for active toolchain.
OpenIn sheetbashsame section
Install rustfmt
Add the formatter component.
OpenIn sheetbashsame section
Install Clippy
Add the Clippy lint component.
OpenIn sheetbashsame section
Open local Rust docs
Launch the locally installed Rust documentation.
OpenIn sheetbashsame section
List installed toolchains
Display toolchains available on the machine.
OpenIn sheetbash1 tag match
Pin toolchain in version-controlled config
Check in a `rust-toolchain.toml` file.
OpenIn sheettoml1 tag match