Show active toolchain details
Display installed toolchains and the active default.
rustup showA first step when builds behave differently than expected across machines or CI.
Commands for fixing toolchain mismatches, missing components, and cross-compilation target issues in Rust CLI projects.
Verify which compiler and channel Cargo is using.
Display installed toolchains and the active default.
rustup showA first step when builds behave differently than expected across machines or CI.
rustup default stableUseful when a machine accidentally defaults to nightly or an older channel.
Use a channel explicitly for one command.
cargo +stable testGood for confirming whether an issue is tied to a specific channel or toolchain version.
Set a local override for the current project.
rustup override set stableUseful when a repository should always use one toolchain regardless of the machine default.
Show the actual executable path selected by rustup.
rustup which rustcHelpful when PATH confusion or editor integration points to the wrong compiler binary.
Install missing tools like clippy or target triples for cross builds.
See whether rustfmt, clippy, or docs are installed.
rustup component listUseful when `cargo fmt` or `cargo clippy` fails because the component is missing.
rustup component add clippyRequired before using `cargo clippy` if the component is not already installed.
rustup component add rustfmtRequired before using `cargo fmt` if rustfmt is missing.
rustup target list --installedUseful when cross-compilation fails because the intended target is not installed.
rustup target add x86_64-unknown-linux-muslA common step when building static Linux binaries or cross-compiling from another host platform.
cargo build --target x86_64-unknown-linux-muslUseful after adding the target with rustup and configuring any required linker or C toolchain pieces.