Skip to content

rust-toolchain.toml is not used for rustup toolchain install #4216

@nazar-pc

Description

@nazar-pc

Verification

Problem

Like many others, I hit an issue where things stopped working in CI because latest version of Rustup didn't install the toolchain implicitly anymore.

I reached out to rustup toolchain install, but looks like it is not exactly equivalent because it didn't install any components mentioned in rust-toolchain.toml:

56.30 error: "/root/.rustup/toolchains/nightly-2024-12-24-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/Cargo.lock" does not exist, unable to build with the standard library, try:
56.30         rustup component add rust-src --toolchain nightly-2024-12-24-x86_64-unknown-linux-gnu

Steps

  1. Have rust-toolchain.toml with components = ["rust-src"]
  2. Run rustup toolchain install

I expect for toolchain to be installed with all components and targets to be installed too.

Right now components and targets do not seem to be installed.

Possible Solution(s)

No response

Notes

It'd be amazing if I could also install rustup itself with --default-toolchain none and simply rely on rustup toolchain install so I don't have to duplicate the version in multiple places of the project.

Rustup version

rustup 1.28.0 (6e19fbec7 2025-03-02)

Installed toolchains

-

OS version

Ubuntu 24.04

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions