rustup-run

Run commands with a specific Rust toolchain

TLDR

Run command with toolchain
$ rustup run stable cargo build
Run with nightly
$ rustup run nightly rustc --version
Run specific version
$ rustup run [1.70.0] cargo test

SYNOPSIS

rustup run toolchain command [args...]

DESCRIPTION

rustup run executes a command with a specific Rust toolchain. Temporarily uses specified toolchain regardless of default or override settings.

PARAMETERS

--install

Install toolchain if missing.

INSTALL

sudo apt install rustup
sudo dnf install rustup
sudo pacman -S rustup
sudo zypper install rustup
brew install rustup
nix profile install nixpkgs#rustup

SEE ALSO

rustup(1), rustup-override(1)