Skip to content

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

Open
@RalfJung

Description

@RalfJung

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-download-rustcArea: The `rust.download-rustc` build option.C-enhancementCategory: An issue proposing an enhancement or a PR with one.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions