LinuxCommandLibrary

rustup-set

Set the active rust toolchain

TLDR

Set the default host triple

$ rustup set default-host [host_triple]
copy

Set the default profile (minimal includes only rustc, rust-std and cargo, whereas default adds rust-docs, rustfmt and clippy)
$ rustup set profile [minimal|default]
copy

Set whether rustup should update itself when running rustup update
$ rustup set auto-self-update [enable|disable|check-only]
copy

SYNOPSIS

rustup default <toolchain>

PARAMETERS

<toolchain>
    Specifies the Rust toolchain to set as the default. This can be a release channel (e.g., stable, beta, nightly), a precise version string (e.g., 1.70.0), or the name of a custom-installed toolchain.

DESCRIPTION

The command rustup-set refers to the core functionality of setting the default Rust toolchain managed by rustup, the official Rust toolchain installer and manager. While rustup-set itself is not a standard user-facing command in current rustup versions (its role is fulfilled by the rustup default subcommand), its purpose is to define which Rust toolchain will be used system-wide.

This allows developers to specify a preferred Rust version (e.g., stable, beta, nightly, or a specific point release like 1.70.0) that rustup will automatically use for all new shell sessions and projects, unless a local override is set. It streamlines the management of different Rust toolchains, ensuring consistency and making it easy to switch between versions as needed for various development tasks.

CAVEATS

The exact command rustup-set is not a direct executable or commonly invoked subcommand of rustup. Its intended functionality is performed by rustup default. This command sets the global default toolchain. For setting a toolchain specific to a particular project directory, use rustup override set. Ensure rustup is properly installed and initialized for this command to function.

EXAMPLE USAGE

To set the stable Rust toolchain as default:
rustup default stable

To set the nightly Rust toolchain as default:
rustup default nightly

To set a specific Rust version as default (if installed):
rustup default 1.70.0

HISTORY

rustup was created to address the complexity of managing multiple Rust toolchains and targets. The ability to set a 'default' toolchain has been a fundamental feature since rustup's inception. While the specific internal implementation or naming might have varied (leading to references like rustup-set), the user-facing command for this core functionality consolidated into rustup default, providing a clear and consistent way for developers to manage their preferred Rust version.

SEE ALSO

rustup(1), rustup override(1), rustup toolchain(1), rustup update(1)

Copied to clipboard