rust-lang / rust-lang/rustup

Make `rustup update` completely update the default target before working on others

Open
#4,109 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Rust
Stars
7k
Forks
1.1k
Avg merge
22h 40m
Merged PRs (30d)
46

Description

Problem you are trying to solve

For anyone who has multiple targets installed, completing a rustup update can take quite a while. It seems the order of operations is:

  1. Download rust-std for all installed targets
  2. Download cargo, rust-src, and other components
  3. Download rust-std for the native/default target (?)
  4. Download rustc
  5. Remove old components
  6. Install downloaded components

However, often times only the default target is of immediate interest.

Solution you'd like

Instead, do something like the following order:

  1. Move the old toolchain directory to a different name
  2. Download and install rustc
  3. Download and install rust-std for the default toolchain/target
  4. Download and install components
  5. Download and install all remaining targets
  6. Remove the backup directory

This should make it feasible to start working with the most commonly used target within a couple of minutes while everything else updates in the background.

Notes

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the existing rustup update flow and its current download, installation, backup, and cleanup order. Compare that flow with the proposed default-target-first sequence, then verify that the default target becomes usable before other targets finish and that remaining components still update and cleanup completes successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, developer-experience
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.