rust-lang / rust-lang/rustup

Undocumented environment variables?

Open
#3,957 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
Rust
Stars
7k
Forks
1.1k
Avg merge
22h 40m
Merged PRs (30d)
46

Description

Problem you are trying to solve

https://rust-lang.github.io/rustup/environment-variables.html
https://rust-lang.github.io/rustup/dev-guide/tips-and-tricks.html

After reading the rustup code a little (https://github.com/rust-lang/rust-forge/issues/760), I found out that not all the environment variables it supports are documented. A quick search using grep -rniI -e "var(" -e "env\!(" -e "env(" -e "var_os(" revealed at least these:

https://github.com/rust-lang/rustup/blob/edf5c22d478ecce60ae35e3d3a1ae5ff04c6bedb/src/cli/self_update/unix.rs#L21

https://github.com/rust-lang/rustup/blob/edf5c22d478ecce60ae35e3d3a1ae5ff04c6bedb/src/cli/self_update/windows.rs#L186

https://github.com/rust-lang/rustup/blob/edf5c22d478ecce60ae35e3d3a1ae5ff04c6bedb/src/cli/self_update.rs#L512

https://github.com/rust-lang/rustup/blob/edf5c22d478ecce60ae35e3d3a1ae5ff04c6bedb/src/cli/self_update.rs#L627

https://github.com/rust-lang/rustup/blob/edf5c22d478ecce60ae35e3d3a1ae5ff04c6bedb/src/dist/mod.rs#L368

https://github.com/rust-lang/rustup/blob/edf5c22d478ecce60ae35e3d3a1ae5ff04c6bedb/src/dist/mod.rs#L534

https://github.com/rust-lang/rustup/blob/edf5c22d478ecce60ae35e3d3a1ae5ff04c6bedb/src/dist/mod.rs#L660

https://github.com/rust-lang/rustup/blob/edf5c22d478ecce60ae35e3d3a1ae5ff04c6bedb/src/utils/utils.rs#L248

https://github.com/rust-lang/rustup/blob/edf5c22d478ecce60ae35e3d3a1ae5ff04c6bedb/src/config.rs#L274

https://github.com/rust-lang/rustup/blob/edf5c22d478ecce60ae35e3d3a1ae5ff04c6bedb/src/config.rs#L400

https://github.com/rust-lang/rustup/blob/edf5c22d478ecce60ae35e3d3a1ae5ff04c6bedb/src/toolchain.rs#L247

Solution you'd like

Describe all this somewhere and/or make a list of variables for internal use so as not to confuse people.

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 with doc/user-guide/src/environment-variables.md and compare its list with the environment-variable reads linked in src/cli/self_update/unix.rs, src/cli/self_update/windows.rs, src/cli/self_update.rs, src/dist/mod.rs, src/utils/utils.rs, src/config.rs, and src/toolchain.rs. Identify which variables should be documented or marked internal, resolve the RUSTUP_DIST_SERVER guidance, and ensure the documentation covers the supported variables.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 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.