Esta página se muestra en inglés. Una traducción al español está en curso.
ScriptsMay 18, 2026·3 min de lectura

rustup — The Official Rust Toolchain Installer and Manager

rustup is the official tool for installing and managing Rust toolchains. It handles stable, beta, and nightly releases, cross-compilation targets, and components like clippy, rustfmt, and rust-analyzer across all supported platforms.

Listo para agents

Este activo puede ser leído e instalado directamente por agents

TokRepo expone un comando CLI universal, contrato de instalación, metadata JSON, plan según adaptador y contenido raw para que los agents evalúen compatibilidad, riesgo y próximos pasos.

Needs Confirmation · 64/100Política: confirmar
Superficie agent
Cualquier agent MCP/CLI
Tipo
Skill
Instalación
Single
Confianza
Confianza: Established
Entrada
rustup Toolchain Manager
Comando CLI universal
npx tokrepo install 22fbee2a-52b6-11f1-9bc6-00163e2b0d79

Introduction

rustup is the official installer and version manager for the Rust programming language. It manages multiple Rust toolchain versions side by side, handles cross-compilation targets, and installs companion tools like clippy and rustfmt. It is the recommended way to install Rust on any platform.

What rustup Does

  • Installs and updates stable, beta, and nightly Rust toolchains with a single command
  • Manages cross-compilation targets like WebAssembly, ARM, and RISC-V
  • Installs and updates components including clippy, rustfmt, rust-src, and rust-analyzer
  • Supports per-directory toolchain overrides via rust-toolchain.toml files
  • Provides proxy binaries that route rustc, cargo, and other tools to the active toolchain

Architecture Overview

rustup installs itself as a set of proxy binaries (rustc, cargo, rustup) that detect which toolchain to use based on directory overrides, environment variables, or the default setting. When invoked, the proxy resolves the correct toolchain path and executes the real binary. Toolchains are downloaded as compressed archives from Rust's official distribution servers and stored in ~/.rustup/toolchains/. Each toolchain is self-contained with its own compiler, standard library, and installed components.

Self-Hosting & Configuration

  • Install on Unix with the one-liner: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  • On Windows, download and run rustup-init.exe from https://rustup.rs
  • Set a project-specific toolchain by creating a rust-toolchain.toml with [toolchain] channel = "nightly"
  • Configure the default toolchain with rustup default stable or rustup default nightly-2026-01-15
  • Set RUSTUP_HOME and CARGO_HOME environment variables to customize installation directories

Key Features

  • Seamless switching between stable, beta, nightly, and dated nightly toolchains
  • Cross-compilation target management with rustup target add for dozens of platforms
  • Component management for optional tools like miri, rust-src, and llvm-tools
  • Automatic toolchain selection per project via rust-toolchain.toml
  • Self-update capability that keeps rustup itself current alongside toolchains

Comparison with Similar Tools

  • asdf — generic version manager for many languages; rustup is Rust-specific with deeper component and target management
  • Nix — reproducible package manager; rustup provides Rust-specific ergonomics like target and component management
  • mise — polyglot dev tool manager; rustup remains the canonical way to manage Rust with full component support
  • Manual download — pre-built binaries are available but lack multi-version and cross-target management
  • cargo-binstall — installs Rust binaries; rustup manages the compiler toolchain itself

FAQ

Q: How do I install a specific nightly version? A: Use rustup install nightly-2026-01-15 to pin a dated nightly, then set it as default or add a rust-toolchain.toml file.

Q: Can I use rustup in CI/CD? A: Yes. Most CI services pre-install rustup. Use rustup show to verify the toolchain and rustup target add to set up cross-compilation targets.

Q: Does rustup work offline? A: Not for installation, but once toolchains are downloaded they work fully offline. You can also set up a local mirror with RUSTUP_DIST_SERVER.

Q: How do I uninstall a toolchain I no longer need? A: Run rustup toolchain uninstall nightly to remove a specific toolchain and free disk space.

Sources

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados