rust-lang/rustup
52.6
Adequate · 14 November 2026
16.2k
lines of production code
Rust
primary language
5
measurements over time
What this system is
Features
Initial deployment of the rustup.rs website
The rustup.rs website is now live, providing an installer landing page that automatically detects the user's operating system (including Windows on ARM, Linux variants, macOS, FreeBSD, NetBSD, and Solaris) and displays the appropriate installation instructions. The site features a copy-to-clipboard button for the installation command, supports dark mode, and enforces security best practices via strict HTTP headers (HSTS, CSP, X-Frame-Options) defined in the site configuration.
www · high confidence
Initial repository scaffolding and developer tooling
This change establishes the initial project structure for rustup, adding essential configuration files for development workflows. It introduces a \.dockerignore\ to optimize Docker builds, a Nix flake (\flake.nix\) and \.envrc\ for developer environment management, and configuration files for code formatting and linting (\.oxfmtrc.json\, \.rustfmt.unstable.toml\, \.taplo.toml\). It also adds standard repository metadata files such as \LICENSE-APACHE\, \LICENSE-MIT\, \README.md\, \CHANGELOG.md\, and \CONTRING.md\, along with a \rust-analyzer.example.toml\ for IDE integration.
(repo-wide) · high confidence
New CI deployment and release helper scripts
The CI infrastructure now includes a suite of new scripts to manage the release process and deployment artifacts. \ci/deploy.bash\ and \ci/sync-dist.py\ automate the synchronization of binaries and release metadata between local, development, and production S3 environments, including CloudFront invalidations. \ci/prepare-deploy.bash\ and \ci/prepare-deploy.ps1\ handle the generation of SHA-256 hashes and the preparation of distribution files for upload. Additionally, \ci/changelog\_helper.py\ provides utilities to format release notes by replacing PR numbers with links and extracting contributor usernames, while \ci/cloudfront-invalidation.txt\ defines the specific artifact paths requiring cache invalidation upon release.
ci · high confidence
New shell environment scripts and self-update locking
The self-update module now includes dedicated environment scripts for Fish, Nushell, PowerShell, tcsh, and Xonsh, alongside the existing POSIX shells, to correctly configure the PATH for these interpreters. It also introduces a file-based locking mechanism (SelfUpdateLock) to serialize self-updates and prevent race conditions during binary replacement.
_src/cli/self\update · high confidence
Behavioural changes
Add musl-based sccache installation script with checksum verification
The CI pipeline now includes a dedicated bash script to install sccache version 0.2.12 for the x86\_64-unknown-linux-musl target. This script downloads the binary from the official Mozilla releases, verifies its integrity using a hardcoded SHA-256 checksum, and installs it to /usr/local/bin, ensuring a consistent and secure build cache environment for musl-based builds.
ci/docker/scripts · high confidence
Async runtime integration and Windows DLL security hardening
The rustup-init binary now runs on a manual Tokio multi-threaded runtime, enabling asynchronous execution for CLI modes and improving I/O performance. On Windows, the binary now explicitly configures DLL loading to search the system32 directory first, mitigating risks from malicious DLLs in user download folders. Additionally, the binary now reports a specific error when invoked without a recognizable executable name (arg0).
src/bin · high confidence
Download logic consolidated into a new module with improved partial-file handling
The download implementation has been refactored into a dedicated \src/download\ module, introducing a builder-style API (\DownloadOptions\ and \Download\) that simplifies how downloads are configured and executed. A key behavioral improvement is that partial downloads are no longer deleted when a network failure occurs, allowing users to resume interrupted transfers more reliably. The module also supports configuring the TLS backend via the \RUSTUP\_USE\_RUSTLS\ environment variable (defaulting to rustls when available) and allows overriding the download timeout via \RUSTUP\_DOWNLOAD\_TIMEOUT\. Tests have been added to verify proxy handling, partial file resumption, and the new retention behavior on network errors.
src/download · high confidence
Major internal refactoring and metadata version bump
The internal architecture of the toolchain manager has been significantly restructured, including the introduction of new modules for CLI, installation, and process handling, alongside a refactor of the configuration and toolchain resolution logic. The metadata version has been bumped from 2 to 12, requiring a migration for existing installations. Additionally, the system now supports TOML-based toolchain override files (rust-toolchain.toml) and introduces a new \ActiveSource\ enum to better track how the active toolchain was determined (e.g., default, environment, command line, or override).
src · high confidence
New component installation and transactional rollback system
The component distribution layer has been refactored to use a new \src/dist/component\ module that implements a transactional file system interface for installing and uninstalling toolchain components. This change introduces a \Transaction\ struct that tracks file system changes (add, copy, move, remove) and allows for automatic rollback if an installation fails before commit. It also adds support for ZStd compression in package unpacking and normalizes path separators during component manifest encoding/decoding to ensure cross-platform compatibility.
src/dist/component · high confidence
New disk I/O executor with memory-constrained fallback
The \src/diskio\ module now implements a new disk I/O execution model that supports both immediate (single-threaded) and threaded (pool-based) modes. A key behavioral change is that when the available RAM budget is below 512MB, the system automatically falls back to single-threaded unpacking to prevent out-of-memory errors on constrained systems. This is enforced by limiting the effective I/O thread count based on the \RUSTUP\_IO\_THREADS\ environment variable and the current memory budget, ensuring stability during large installations.
src/diskio · high confidence
Redesigned distribution system with v2 manifest support and ZStd compression
The distribution module has been refactored to support the Rust distribution v2 manifest format, introducing a new \Config\ structure to manage installed components and a \Manifest\ parser that handles package renames and target-specific availability. The download engine now supports ZStd compression in addition to XZ, validates file hashes during download, and allows concurrent component downloads controlled by the \RUSTUP\_CONCURRENT\_DOWNLOADS\ environment variable. Users will see improved error messaging for missing components, better handling of interrupted downloads, and the ability to install or update toolchains using the new manifest structure.
src/dist · high confidence
Refactored terminal output and color handling
The terminal output subsystem has been refactored to use the \anstream\ and \anstyle\ libraries instead of \termcolor\, enabling more robust color choice detection and ANSI escape code handling. This change introduces new internal modules (\file\_source\ and \terminal\_source\) to manage stdin/stdout/stderr streams and test writers, while simplifying locking mechanisms for log writes and test scenarios. Users will see consistent color behavior based on the \RUSTUP\_TERM\_COLOR\ environment variable and TTY detection, with improved safety in test environments where ANSI codes are stripped unless explicitly forced.
src/process · high confidence
Rename triple module to target\_tuple
The internal module previously named 'triple' has been renamed to 'target\_tuple', and a new file \known.rs\ has been added to this location to define static lists of supported architectures, operating systems, and environments. This change reflects a structural reorganization of how target specifications are stored and accessed within the distribution logic, without altering the external API or user-facing behavior.
_src/dist/target\tuple · high confidence
Replaced Travis CI with GitHub Actions templates
The CI infrastructure has been migrated from Travis CI to GitHub Actions. This change introduces a new templating system in \ci/actions-templates\ that generates the final workflow files, supporting builds on Linux, macOS, Windows, FreeBSD, and Solaris across multiple architectures. The new system handles triggers for pull requests, merges to \main\ and \stable\, scheduled rebuilds, and backport branches, and includes specific jobs for formatting, clippy, and documentation generation.
ci/actions-templates · high confidence
Restructure and modernize the utils crate
The utils module has been reorganized into dedicated files (mod.rs, raw.rs, notify.rs, units.rs) to improve code clarity. This change introduces a new \ExitCode\ type for semantic exit status handling, replaces the legacy logging system with \tracing\ for better observability, and adds a \Size\ struct for human-readable file size formatting. Additionally, file I/O operations now use \anyhow\ for error context, and the notification system has been simplified to log directly via tracing levels.
src/utils · high confidence
Rewrite CLI with clap-derive and modernize logging and styling
The CLI implementation has been rewritten to use \clap-derive\ for argument parsing, replacing the previous manual parser. This change introduces consistent color styling via \anstyle\ and \anstream\, and migrates the internal logging system from \log\/\termcolor\ to \tracing\ with \tracing-subscriber\. Additionally, the installer (\rustup-init\) now respects \--verbose\ and \--quiet\ flags to control log levels when \RUSTUP\_LOG\ is not explicitly set, and the \rustup doc\ command gains a \--serve\ option to host documentation via a local HTTP server, bypassing browser sandbox restrictions on \file://\ URLs.
src/cli · high confidence
Support for default toolchain aliases and stricter name validation
Users can now use the alias 'default' to refer to the configured default toolchain in various contexts, such as override files or environment variables, allowing commands to automatically adapt when the default toolchain changes. Additionally, toolchain names starting with '+' or '-' are now explicitly forbidden, preventing ambiguous or invalid toolchain references.
src/toolchain · high confidence
Test coverage
Added tests for v2 distribution server updates; Comprehensive CLI test suite migration and expansion; New test infrastructure for CLI and distribution mocking.
Dependencies
Rustup 1.30.0: Modernized dependency stack and edition upgrade
The rustup package has been updated to version 1.30.0, upgrading the Rust edition to 2024 and significantly modernizing the dependency tree. Key changes include upgrading the CLI framework from clap 1 to clap 4 (with derive support), replacing the hyper 0.6 HTTP backend with hyper 1.0 and tokio, and updating the TLS implementation to use reqwest 0.13 with rustls 0.23 and rustls-platform-verifier 0.7. The project also migrates from error-chain to thiserror 2 and anyhow, updates the random number generator to rand 0.10, and adopts anstyle 1 for terminal output. These updates improve build performance, security, and compatibility with modern Rust standards.
(dependencies) · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 56 → 53 (-3.6)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.
Lenses
- Code Health 73 → 70 (-3.5)
- Architecture 85 → 97 (+11.4)
- Maturity 54 → 54 (-0.2)
- Readiness 78 → 78 (+0.3)
- Security 44 → 36 (-7.5)
- Accessibility 80 → 82 (+1.4)
- Performance 100 → 100 (+0.0)
Resolved (12)
- Duplicated block (11 lines × 2) (src/diskio/mod.rs)
- Duplicated block (13–15 lines × 2) (src/errors.rs)
- Duplicated block (15–16 lines × 2) (src/toolchain/channels.rs)
- Inverted test pyramid
- No ADRs found
- Projects may be oversized for their cohesion
- Repeated repair: src/cli/self_update/stage.rs (src/cli/self_update/stage.rs)
- Secret: aws-access-token (.travis.yml)
- Secret: aws-access-token (.travis.yml)
- Secret: aws-access-token (appveyor.yml)
- Secret: aws-access-token (appveyor.yml)
- TodoComment (src/download/mod.rs)
New (25)
- AWS access key ID with no secret key beside it (.travis.yml)
- AWS access key ID with no secret key beside it (.travis.yml)
- AWS access key ID with no secret key beside it (appveyor.yml)
- AWS access key ID with no secret key beside it (appveyor.yml)
- Duplicated block (10 lines × 2) (src/errors.rs)
- Duplicated block (11 lines × 2) (src/diskio/mod.rs)
- Duplicated block (15–16 lines × 2) (src/toolchain/channels.rs)
- Edited copies of one member (4 members, 7+ corresponding lines) (src/dist/component/transaction.rs)
- Edited copy of a member (10 corresponding lines) (src/dist/temp.rs)
- Edited copy of a member (11 corresponding lines) (src/toolchain/names.rs)
- Edited copy of a member (12 corresponding lines) (src/cli/self_update.rs)
- Edited copy of a member (12 corresponding lines) (src/cli/self_update/unix.rs)
- Edited copy of a member (14 corresponding lines) (src/cli/rustup_mode.rs)
- Edited copy of a member (14 corresponding lines) (src/dist/manifestation.rs)
- Edited copy of a member (15 corresponding lines) (src/cli/self_update/shell.rs)
- Edited copy of a member (16 corresponding lines) (src/dist/component/transaction.rs)
- Edited copy of a member (18 corresponding lines) (src/dist/temp.rs)
- Edited copy of a member (27 corresponding lines) (src/cli/rustup_mode.rs)
- Edited copy of a member (30 corresponding lines) (src/errors.rs)
- No ADRs found (src/bin/rustup-init.rs)
- …and 5 more
Changes since last survey
- 57 commits — 48 feature/other, 9 fixes
By area
- (root) — 9 commits
- ci/actions-templates — 9 commits
- src/dist — 8 commits
- src/cli — 5 commits
- tests/suite — 5 commits
- src/config.rs — 4 commits
- src/test — 4 commits
- src/download — 3 commits
- .github/workflows — 2 commits
- src/diskio — 2 commits
- src/utils — 2 commits
- ci/docker — 1 commit
- src/install.rs — 1 commit
- src/settings.rs — 1 commit
- src/test.rs — 1 commit
Notable commits
- fix: Fix profile-only toolchain file validation
- fix: ci: Fix aarch64-unknown-freebsd
- fix: fix(config)!: store override paths as given
- fix: fix(config): look up directory overrides by directory identity
- fix: fix(config): set and unset overrides by directory identity
- fix: fix(config): show invalid date in release hint warnings
- fix: fix(diskio): stop warn!()ing in get_executor()
- fix: fix(download): reinforce result handling in DownloadCfg::download_hash()
- fix: fix(test): fix rustup-init binary detection in fixture
- change: Support file locking on Solaris
- change: Update platforms to 4.3.0
- change: build(windows): don't build test and bench harnesses for rustup-init
- change: build(windows): skip the startup delay-load list in test builds
- change: chore(deps): lock file maintenance
- change: chore(deps): lock file maintenance
- change: chore(deps): remove remove_dir_all and rayon
- change: chore(deps): update taiki-e/install-action action to v2.87.32
- change: chore(deps): update taiki-e/install-action action to v2.88.0
- change: chore(deps): update taiki-e/install-action action to v2.88.1
- change: chore(deps): update taiki-e/install-action action to v2.89.0
- …and 37 more
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
rust-lang/rustup was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 14 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit c3fb8fc1524e6cc7a88ea9f6f0fa2d812d7f84e2 — the exact code this score is about.
- Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.65+preprod-e1a3b69fc8ee.