Proposal: special toolchain names referring to particular override levels
Maintainer thường phản hồi trong vòng 1 ngày
@14elias đang làm issue này rồi.
Từ ngày 6/9/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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.
- Ngôn ngữ chính
- Rust
- Star
- 7.1k
- Fork
- 1.1k
- Merge trung bình
- 1 ngày 5 giờ
- Pull request đã merge (30 ngày)
- 40
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của rust-lang/rustup
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
rust-lang/rustup#5172 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement O-shell
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
meta
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
rust-lang/rustup#5191 · 3 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Simplify the release processĐang mởenhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Rustup OOMCó thể đã có người làm @Kaileshwar16 đã nhận 2 ngày trước. Đang mởbug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
rust-lang/rustup#5173 · 9 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của rust-lang/rustup
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
apache/datafusion-iceberg#100 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: cua-driver skill fails Agent Skills frontmatter validationCó thể đã có người làm @Mearman đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area/tools bug session-analysis
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
oracle/rust-oracledb#66 ·
-
`PrimitiveArray::validate_decimal_precision` rejects every decimal array with a negative scaleĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày