Other Installation Methods - Rust Forge
Keyboard shortcuts Press ← or → to navigate between chapters Press S or / to search in the book Press ? to show this help Press Esc to hide this help Rust Forge Other Rust Installation Methods Which installer should you use? Other ways to install rustup Standalone installers Source code Which installer should you use? Rust runs on many platforms, and there are many ways to install Rust. If you want to install Rust in the most straightforward, recommended way, then follow the instructions on the main installation page .
That page describes installation via rustup , a tool that manages multiple Rust toolchains in a consistent way across all platforms Rust supports (see rustup documentation ). Why might one not want to install using those instructions? Offline installation. rustup downloads components from the internet on demand. If you need to install Rust without access to the internet, rustup is not suitable. Preference for the system package manager.
On Linux in particular, but also on macOS with Homebrew , MacPorts or pkgsrc , and Windows with Chocolatey or Scoop , developers sometimes prefer to install Rust with their platform’s package manager. Preference against curl | sh . On Unix, we usually install rustup by running a shell script via curl . Some have concerns about the security of this arrangement and would prefer to download and run the installer themselves.
Validating signatures. Although rustup performs its downloads over HTTPS, the only way to verify the signatures of Rust installers today is to do so manually with the standalone installers. Rust’s platform support is defined in three tiers , which correspond closely with the installation methods available: in general, the Rust project provides binary builds for all Tier 1 and Tier 2 platforms, and they are all installable via rustup .
Some Tier 2 platforms though have only the standard library available, not the compiler itself; that is, they are cross-compilation targets only; Rust code can run on those platforms, but they do not run the compiler itself. Such targets can be installed with the rustup target add command. Other ways to install rustup Please refer to rustup ’s Other installation methods . Standalone installers The official Rust standalone installers contain a single release of Rust, and are suitable for offline installation.
They come in three forms: tarballs (extension .tar.xz ), that work in any Unix-like environment, Windows installers ( .msi ), and Mac installers ( .pkg ). These installers come with rustc , cargo , rustdoc , the standard library, and the standard documentation, but do not provide access to additional cross-targets like rustup does. The most common reasons to use these are: Offline installation Preferring a more platform-integrated, graphical installer on Windows Each of these binaries is signed with the Rust signing key , which is available on keybase.io , by the Rust build infrastructure, with GPG .
In the tables below, the .asc files are the signatures. Past releases can be found in the archive . platform stable (1.100.0) beta nightly aarch64-apple-darwin pkg pkg.asc tar.xz tar.xz.asc pkg pkg.asc tar.xz tar.xz.asc pkg pkg.asc tar.xz tar.xz.asc aarch64-pc-windows-gnullvm msi msi.asc tar.xz tar.xz.asc msi msi.asc tar.xz tar.xz.asc msi msi.asc tar.xz tar.xz.asc aarch64-pc-windows-msvc msi msi.asc tar.xz tar.xz.asc msi msi.asc tar.xz tar.xz.asc msi msi.asc tar.xz tar.xz.asc aarch64-unknown-freebsd tar.xz tar.xz.asc tar.xz tar.xz.asc tar.xz tar.xz.asc aarch64-unknown-linux-gnu tar.xz tar.xz.asc tar.xz tar.xz.asc tar.xz tar.xz.asc aarch64-unknown-linux-musl tar.xz tar.xz.asc tar.xz tar.xz.asc tar.xz tar.xz.asc aarch64-unknown-linux-ohos tar.xz tar.xz.asc tar.xz tar.xz.asc tar.xz tar.xz.asc arm-unknown-linux-gnueabi tar.xz tar.xz.asc tar.xz tar.xz.asc tar.xz tar.xz.asc arm-unknown-linux-gnueabihf tar.xz tar.xz.asc tar.xz tar.xz.asc tar.xz tar.xz.asc armv7-unknown-linux-gnueabihf tar.xz tar.xz.asc tar.xz tar.xz.asc tar.xz tar.xz.asc i686-unknown-linux-gnu tar.xz tar.xz.asc tar.xz tar.xz.asc tar.xz tar.xz.asc loongarch64-unknown-linux-gnu tar.xz tar.xz.asc tar.xz tar.xz.asc tar.xz tar.xz.asc loongarch64-unknown-linux-musl tar.xz tar.xz.asc tar.xz tar.xz.asc tar.xz tar.xz.asc powerpc-unknown-linux-gnu tar.xz tar.xz.asc tar.xz tar.xz.asc tar.xz tar.xz.asc powerpc64-unknown-linux-gnu tar.xz tar.xz.asc tar.xz tar.xz.asc tar.xz tar.xz.asc powerpc64-unknown-linux-musl tar.xz tar.xz.asc tar.xz tar.xz.asc tar.xz tar.xz.asc powerpc64le-unknown-linux-gnu tar.xz tar.xz.asc tar.xz tar.xz.asc tar.xz tar.xz.asc powerpc64le-unknown-linux-musl tar.xz tar.xz.asc tar.xz tar.xz.asc tar.xz tar.xz.asc riscv64gc-unknown-linux-gnu tar.xz tar.xz.asc tar.xz tar.xz.asc tar.xz tar.xz.asc riscv64gc-unknown-linux-musl tar.xz tar.xz.asc tar.xz tar.xz.asc tar.xz tar.xz.asc s390x-unknown-linux-gnu tar.xz tar.xz.asc tar.xz tar.xz.asc tar.xz tar.xz.asc sparcv9-sun-solaris tar.xz tar.xz.asc tar.xz tar.xz.asc tar.xz tar.xz.asc x86_64-apple-darwin pkg pkg.asc tar.xz tar.xz.asc pkg pkg.asc tar.xz tar.xz.asc pkg pkg.asc tar.xz tar.xz.asc x86_64-pc-solaris tar.xz tar.xz.asc tar.xz tar.xz.asc tar.xz tar.xz.asc x86_64-pc-windows-gnu msi msi.asc tar.xz tar.xz.asc msi msi.asc tar.xz tar.xz.asc msi msi.asc tar.xz tar.xz.asc x86_64-pc-windows-gnullvm msi msi.asc tar.xz tar.xz.asc msi msi.asc tar.xz tar.xz.asc msi msi.asc tar.xz tar.xz.asc x86_64-pc-windows-msvc msi msi.asc tar.xz tar.xz.asc msi msi.asc tar.xz tar.xz.asc msi msi.asc tar.xz tar.xz.asc x86_64-unknown-freebsd tar.xz tar.xz.asc tar.xz tar.xz.asc tar.xz tar.xz.asc x86_64-unknown-illumos tar.xz tar.xz.asc tar.xz tar.xz.asc tar.xz tar.xz.asc x86_64-unknown-linux-gnu tar.xz tar.xz.asc tar.xz tar.xz.asc tar.xz tar.xz.asc x86_64-unknown-linux-musl tar.xz tar.xz.asc tar.xz tar.xz.asc tar.xz tar.xz.asc x86_64-unknown-netbsd tar.xz tar.xz.asc tar.xz tar.xz.asc tar.xz tar.xz.asc Source code If you want to build the Rust toolchain from source code, you can use the following links to download source code tarballs.
Channel Archives + Signatures stable (1.100.0) tar.xz tar.xz.asc beta tar.xz tar.xz.asc nightly tar.xz tar.xz.asc If you want to make sure that the published source tarball matches what is in the rust git repository, you can use the following script as a template: Script for reproducing source tarball contents #!/bin/bash set -e # You can use either a commit SHA or a stable release version (e.g. 1.XY.Z) TAG=a8cfc83801301c2b4f0fd030192e268eeb15d473 # TAG=1.77.1 # Clone Rust toolchain repository from GitHub git clone https://github.com/rust-lang/rust cd rust git reset --hard ${TAG} git submodule update --init --recursive cat >config.toml << EOF [rust] # Use for a commit SHA channel = "nightly" # Use for a stable release # channel = "stable" [dist] compression-formats = ["xz"] compression-profile = "fast" EOF # Build the source tarball from git into build/dist/ ./x dist rustc-src # Download source tarball for a commit SHA wget https://ci-artifacts.rust-lang.org/rustc-builds/${TAG}/rustc-nightly-src.tar.xz # Download a source tarball for a stable release # wget https://static.rust-lang.org/dist/rustc-${TAG}-src.tar.xz # Decompress the tarballs and check if they're the same xz --decompress rustc-*-src.tar.xz xz --decompress build/dist/rustc-*-src.tar.xz diff rustc-*-src.tar build/dist/rustc-*-src.tar