Proposal: special toolchain names referring to particular override levels
メンテナーはふだん 1 日以内に返信
@14elias がすでに取り組んでいます。
2026年9月6日 から。
評価
この issue はまだ評価されていません。
説明
Part of https://github.com/rust-lang/rustup/issues/4059.
Since https://github.com/rust-lang/rustup/pull/4932 it has been decided that only characters satisfying GeneralSecurityProfile::identifier_allowed() should be allowed in rustup toolchain names.
This has opened up new possibilities for us to assemble our special/reserved toolchain names as needed with special characters such as @ or =.
Following up the above efforts, noting the five levels of rustup toolchain overrides:
- The
+<toolchain>override.- The
RUSTUP_TOOLCHAINenvironment variable.- The
rustup override setoverride.- The
rust-toolchain.tomloverride.- The default toolchain.
... aiming to address https://github.com/rust-lang/rustup/issues/4391, I propose the following changes:
- Make
envanddefaultnew reserved words in addition to the existingnone. - Introduce the following toolchain syntax:
env: Refers to the toolchain that should be activated by the env override.- This will not be useful per se but sometime people want to be explicit, e.g.
rustup run env cargoinstead ofcargo.
- This will not be useful per se but sometime people want to be explicit, e.g.
dir=<dir>: Refers to the toolchain that should be activated by the dir override on<dir>or its fallback dirs.- e.g.
cargo +dir=./crates/download
- e.g.
file=<file>: Refers to the toolchain that should be activated by the TOML override in<file>which follows therust-toolchain.tomlschema.- e.g.
cargo +file=windows.toml, for a Windows-specificrust-toolchain.tomlsetup.
- e.g.
default: Refers to the default toolchain. Bails out if none is set.- e.g.
cargo +default
- e.g.
Concerns
- How should we handle the error for
dir=andfile=when the dir/TOML override doesn't exist? Should we bail out or warn and fall back to the next level?- My guess is that we should warn and fall back.
- Consider the relation between this proposal and #4945. Should we resolve the toolchain name when the user issues
rustup default file=windows.toml? If so, should we fully resolve or partially resolve it?- My guess is that we should partially resolve to an official or a custom toolchain name (that isn't a reserved word and doesn't have special characters like
=).
- My guess is that we should partially resolve to an official or a custom toolchain name (that isn't a reserved word and doesn't have special characters like
- Can we use this in
RUSTUP_TOOLCHAIN(isRUSTUP_TOOLCHAINnot guaranteed to be a parsable toolchain name by downstreams other than rustup)? If we can, we will also resolve #2793 at the same time by settingRUST_TOOLCHAIN=default.- I think we probably can.
Note
This also simplifies https://github.com/rust-lang/cargo/issues/10098 because this involves changing the override lookup logic to work with arbitrary base paths. In that case, we'd just need to alter the path for our dir/TOML override source by prefixing it with the path passed via cargo -C.
- 主要言語
- Rust
- スター
- 7.1k
- フォーク
- 1.1k
- 平均マージ
- 1日 3時間
- マージ済み PR(30日)
- 36
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
rust-lang/rustup のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
enhancement O-shell
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
default download backend gets repeated connection resets; curl backend does not対応中かも @djc が 1 日前に担当しました。 オープンbug
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
rust-lang/rustup#5176 · コメント 5 件 · リアクション 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Rustup OOMオープンbug
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
rust-lang/rustup#5173 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
1.29.3 release planning対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンrelease
難易度 4/5 1〜2日 初心者へのやさしさ 20/100
メンテナーはふだん 1 日以内に返信
rust-lang/rustup の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
yunfie-twitter/Palleria#474 ·
メンテナーはふだん 1 日以内に返信
-
good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
servo/rust-smallvec#827 ·
メンテナーはふだん 1 日以内に返信
-
bug tests
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信