Other installation methods

The primary installation method, as described at https://rustup.rs, differs by platform:

  • On Windows, download and run the rustup-init.exe built for i686-pc-windows-gnu target. In general, this is the build of rustup one should install on Windows. Despite being built against the GNU toolchain, the Windows build of rustup will install Rust for the MSVC toolchain if it detects that MSVC is installed. If you prefer to install GNU toolchains or x86_64 toolchains by default this can be modified at install time, either interactively or with the --default-host flag, or after installation via rustup set default-host.
  • On Unix, run curl https://sh.rustup.rs -sSf | sh in your shell. This downloads and runs rustup-init.sh, which in turn downloads and runs the correct version of the rustup-init executable for your platform.

rustup-init accepts arguments, which can be passed through the shell script. Some examples:

$ curl https://sh.rustup.rs -sSf | sh -s -- --help
$ curl https://sh.rustup.rs -sSf | sh -s -- --no-modify-path
$ curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly
$ curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain none
$ curl https://sh.rustup.rs -sSf | sh -s -- --profile minimal --default-toolchain nightly

If you prefer you can directly download rustup-init for the platform of your choice:


MSVC builds of rustup additionally require an installation of Visual Studio 2019 or the Visual C++ Build Tools 2019. For Visual Studio, make sure to check the "C++ tools" and "Windows 10 SDK" option. No additional software installation is necessary for basic use of the GNU build.

You can fetch an older version from https://static.rust-lang.org/rustup/archive/{rustup-version}/{target-triple}/rustup-init[.exe]

To install rustup from source, check out the git repository from https://github.com/rust-lang/rustup and run cargo run --release. Note that currently rustup only builds on nightly Rust, and that after installation the rustup toolchains will supersede any pre-existing toolchains by prepending ~/.cargo/bin to the PATH environment variable.