rust-lang / rust-lang/rust

bootstrap: download-rustc should not download rustc_dev unless it is needed

Open
#142,468 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

A-download-rustc C-enhancement T-bootstrap
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

download-rustc currently always downloads 3 things: rustc, std, and rustc_dev. The latter is hardly ever needed, it only comes up when building a tool like Miri that imports rustc crates. rustc_dev is also by far the largest of these three packages, at almost 130MB.

For the sake of those of us that have reduced bandwidth some or all of the time (e.g., when working on a train), it'd be great to avoid downloading 130MB when we don't actually need it. :) Personally, I think it'd be entirely fine to just drop support for downloading rustc_dev: we've lived with having to locally build rustc before building Miri for years and it was fine. For Miri specifically, it is also very rare that you'd work on Miri in the rustc repo and then not change the compiler -- such work should be done in the Miri repo instead. If you are changing the compiler, then the download is of no use. Clippy can't make use of the downloaded rustc_dev since clippy test requires stage 2. However, I don't know the full list of tools that can benefit from the rustc_dev download... this may also affect rustdoc, in which case there is no separate tree that the work could be done with. (Cc @rust-lang/rustdoc)

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 at the download-rustc entry point and trace which tools can use the rustc_dev package, including Miri and rustdoc. The work is done when rustc_dev is not downloaded unless a supported tool needs it, while rustc and std continue to download correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.