Skip to content

Add rustup ensure which doesn't check for updates #4505

@jyn514

Description

@jyn514

Problem you are trying to solve

I have an integration test that requires ~10 different versions of Rust to be installed. In that test, I run rustup toolchain install --no-self-update version1 version2 .... This takes about 5 seconds to run, making my integration tests slower.

I see the following message from rustup as it does this:

info: syncing channel updates for '1.72-aarch64-apple-darwin'
info: latest update on 2023-09-19, rust version 1.72.1 (d5c2e9c34 2023-09-13)
info: component 'llvm-tools' for target 'aarch64-apple-darwin' is up to date
  1.72-aarch64-apple-darwin unchanged - rustc 1.72.1 (d5c2e9c34 2023-09-13)

I infer from this that rustup is touching the network every time I run rustup install. I don't want this behavior; I merely want to make sure the toolchain is installed at all, not that it's up to date. As far as I can tell, there's no flag for rustup toolchain install to configure this.

Solution you'd like

Add a new rustup ensure command (or rustup install --no-update option) which tells rustup to only touch the network if the toolchain doesn't exist on disk.

Notes

rustup 1.28.2 (e4f3ad6 2025-04-28)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions