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 ofrustup
one should install on Windows. Despite being built against the GNU toolchain, the Windows build ofrustup
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 viarustup set default-host
. - On Unix, run
curl https://sh.rustup.rs -sSf | sh
in your shell. This downloads and runsrustup-init.sh
, which in turn downloads and runs the correct version of therustup-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:
- aarch64-linux-android
- aarch64-unknown-linux-gnu
- aarch64-unknown-linux-musl
- arm-linux-androideabi
- arm-unknown-linux-gnueabi
- arm-unknown-linux-gnueabihf
- armv7-linux-androideabi
- armv7-unknown-linux-gnueabihf
- i686-apple-darwin
- i686-linux-android
- i686-pc-windows-gnu
- i686-pc-windows-msvc1
- i686-unknown-linux-gnu
- mips-unknown-linux-gnu
- mips64-unknown-linux-gnuabi64
- mips64el-unknown-linux-gnuabi64
- mipsel-unknown-linux-gnu
- powerpc-unknown-linux-gnu
- powerpc64-unknown-linux-gnu
- powerpc64le-unknown-linux-gnu
- s390x-unknown-linux-gnu
- x86_64-apple-darwin
- x86_64-linux-android
- x86_64-pc-windows-gnu
- x86_64-pc-windows-msvc1
- x86_64-unknown-freebsd
- x86_64-unknown-illumos
- x86_64-unknown-linux-gnu
- x86_64-unknown-linux-musl
- x86_64-unknown-netbsd
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.