rust-lang / rust-lang/rustup

Support (hidden) `.rust-toolchain.toml`

Open
#3,182 15 comments 7 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

In the Linux kernel, we would have liked to take advantage of rustup's rust-toolchain.toml feature to simplify our Quick Start instructions (see https://github.com/Rust-for-Linux/linux/issues/953) back when we needed to pin our compiler version.

However, it appears that there is no support for a hidden version of that configuration file, i.e. .rust-toolchain.toml, which would mean it is very visible when listing the root directory of the kernel sources.

However, most kernel developers did not use Rust, and even for those that did, the file is not really relevant: it would have very rarely changed and if they needed to change the toolchain version, they should have used a directory override in any case, rather than modifying the file.

Thus it is really not needed to show it all the time in listings, and so a hidden .rust-toolchain.toml file would be better. I guess for other projects that may be the case as well.

This would follow other files like .clang-format, .gitignore, .gitattributes, .mailmap, .rustfmt.toml, etc. where configuration is not directly related to the project (say, a Kconfig file) but to tooling.

Solution you'd like

Support for the .rust-toolchain.toml filename.

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 locating rustup's handling of the existing rust-toolchain.toml filename and any related tests; the issue also identifies analogous hidden configuration files such as .clang-format and .rustfmt.toml. Done means rustup accepts .rust-toolchain.toml as an equivalent configuration filename, with coverage for the new name.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 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.