Add shared toolchain directories
Maintainer antworten meist innerhalb von 1 Tag
@rami3l arbeitet bereits daran.
Seit 03.9.2026.
Bewertung
Dieses Issue wurde noch nicht bewertet.
Beschreibung
Problem you are trying to solve
Hello!
As a package maintainer, I want to package different Rust toolchain distributions, such as stable, nightly, specific stable versions, or custom forks (for example, the ESP toolchain). To make this practical, some kind of toolchain multiplexer is needed. While I could write a minimal multiplexer myself, it would lack many useful features.
On the other hand, I could use rustup, which is widely adopted and well supported. However, its main drawback is poor integration with OS package managers. There is no automatic way to make a system-provided Rust toolchain available through rustup. Although it is possible to manually link a system toolchain, there is no mechanism to keep it synchronized with updates from the package manager.
As a user, I want to be able to use both the system-provided toolchain and the official Rust toolchain. For example, I may use one for day-to-day development and the other for feature testing or validation or in some cases I may want to use local distribution infrastructure. Which is possible but with some extra work.
Solution you'd like
To solve these issues, a separate shared directory managed by external tools could be added.
rustup should automatically discover toolchains from the shared directory.
Toolchains in RUSTUP_HOME should take precedence over toolchains from the shared directory. If a local toolchain shadows a shared toolchain with the same name, this should be clearly indicated. For example:
rustup default alt
info: shared toolchain overridden by `RUSTUP_HOME` toolchain
info: default toolchain set to alt
This feature should be opt-in. It should be possible to enable it through user or system configuration, or with an environment variable.
rustup toolchain list should clearly indicate which toolchains belong to which mechanism. For example:
$ rustup toolchain list
shared toolchains:
alt-1.90 (default)
alt-1.92
alt-nightly-1.95 (shadowed)
esp (shadowed)
local:
stable
alt-nightly-1.95
esp (active)
nightly
$ rustup toolchain list -v
shared toolchains (/usr/lib64/rust-toolchains/):
alt-1.90 (default) /usr/lib64/rust-toolchains/alt-1.90/
alt-1.92 /usr/lib64/rust-toolchains/alt-1.92/
alt-nightly-1.95 (shadowed) /usr/lib64/rust-toolchains/alt-nightly-1.95/
esp (shadowed) /usr/lib64/rust-toolchains/esp
local (/home/user/.rustup):
stable /home/user/.rustup/toolchains/stable
alt-nightly-1.95 /home/user/.rustup/toolchains/alt-nightly-1.95
esp (active) /home/user/RPM/BUILD/rust-esp/build/host/stage1
nightly /home/user/.rustup/toolchains/nightly
Notes
Related to https://github.com/rust-lang/rustup/issues/313, https://github.com/rust-lang/rustup/issues/1085, and https://github.com/rust-lang/rustup/issues/2383.
Unresolved problem:
Should this feature provide a mechanism for specifying multiple shared directories, or should it support only a single shared directory?
I have some initial work in progress, so I would like to implement this feature.
- Vorherrschende Sprache
- Rust
- Sterne
- 7.1k
- Forks
- 1.1k
- Ø Merge
- 16 Std. 36 Min.
- Gemergte PRs (30 T.)
- 54
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus rust-lang/rustup
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
rust-lang/rustup#5172 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement O-shell
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag
-
RustUp-init and better arm64 support for Windows.Evtl. vergeben @crutkas hat das vor 2 Tagen übernommen. Offenenhancement
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 66/100
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in rust-lang/rustup
Ähnliche Issues
-
bug good first issue web
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
triage: not actionable
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
oxc-project/oxc#30518 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
area: panel
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
frandev94/shattered-islands#98 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag