The primary installation method, as described at https://rustup.rs, differs by platform:
- On Windows, download and run the
rustup-init.exebuilt for thex86_64-pc-windows-msvctarget. In general, this is the build ofrustupone should install on Windows. This will require the Visual C++ Build Tools 2019 or equivalent (Visual Studio 2019, etc.) to already be installed. If you would prefer to install GNU toolchains or the i686 toolchains by default this can be modified at install time, either interactively, with the--default-hostflag, or after installation viarustup set default-host. - On Unix, run
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shin your shell. This downloads and runsrustup-init.sh, which in turn downloads and runs the correct version of therustup-initexecutable for your platform.
rustup-init accepts arguments, which can be passed through the shell script.
Some examples:
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --help
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --no-modify-path
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain nightly
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain none
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --profile minimal --default-toolchain nightlyPlease note that the rustup project is not maintaining any package mentioned in this section. If you have encountered any problems installing
rustupwith a package manager, please contact the package maintainer(s) for further information.
You can use brew to install rustup-init1:
$ brew install rustup-initThen execute rustup-init to proceed with the installation.
When the installation is complete,
make sure that $HOME/.cargo/bin is in your $PATH,
and you should be able to use rustup normally.
You can manually download rustup-init for a given target from
https://static.rust-lang.org/rustup/dist/{target-triple}/rustup-init[.exe]2 3.
Direct links
- aarch64-apple-darwin
- 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-gnu2
- i686-pc-windows-msvc3
- 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-gnu2
- x86_64-pc-windows-msvc3
- x86_64-unknown-freebsd
- x86_64-unknown-illumos
- x86_64-unknown-linux-gnu
- x86_64-unknown-linux-musl
- x86_64-unknown-netbsd
To get a previous version, use
https://static.rust-lang.org/rustup/archive/{rustup-version}/{target-triple}/rustup-init[.exe].
SHA-256 checksums are also available by appending .sha256 to the link.
To install rustup from source, check out the git repository from
https://github.com/rust-lang/rustup and run cargo run --release. Note that
after installation the rustup toolchains will supersede any pre-existing
toolchains by prepending ~/.cargo/bin to the PATH environment variable.
Footnotes
-
This is not to be confused with the
rustpackage, which is abrew-managedrusttoolchain installation. ↩ -
Windows GNU builds require no additional software for basic use. However, many library crates will not be able to compile until the full MSYS2 with MinGW has been installed. ↩ ↩2 ↩3
-
MSVC builds of
rustupadditionally 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. ↩ ↩2 ↩3