rust-toolchain.toml documentation improvements
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 7k
- Forks
- 1.1k
- Avg merge
- 22h 40m
- Merged PRs (30d)
- 46
Description
Hi everyone! Thanks for all the effort you've put into rustup.
Describe the problem you are trying to solve
Today I'm trying to figure out exactly what rust-toolchain.toml does.
I see that it's documented here. But for example, I can't find where it says that it might cause cargo build to install a toolchain first.
I think the manual should be super up-front about this, because it was surprising to me—even knowing that .cargo/bin/cargo is a proxy—that an innocuous-looking cargo command would implicitly install components.
Describe the solution you'd like
Document rust-toolchain.toml in terms of what effect each setting has, and/or what it's for.
Here are the questions I could not answer from the manual:
- Under what circumstances does a
rustupproxy try to download and install toolchain components? - What all is installed?
- Can I tell it not to?
- How do
componentsandprofileinteract, if I have both? - What happens if I try to use a component that's not selected? What if it's already installed?
- Does
targetsaffect the target architecture of acargo build, the waychannelaffects toolchain selection? Should I use specifytargetsonly if I am cross-compiling? - Do
components,profile, andtargetscome into play only when rustup tries to install toolchain components "on demand"? Is there a command that explicitly does that installation? (one imagines something likerustup install --auto, omitting the<toolchain>argument) - A single toolchain has to be used for the entire build, so toolchain files in dependencies are always ignored... Right?
Also: If installation fails, I think it would be helpful, after the current error message, to add something like the above error happened while trying to install <component>, specified in <file>.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the rustup manual's “The toolchain file” section at overrides.html#the-toolchain-file and review the documented behavior of rust-toolchain.toml, rustup proxies, and cargo build. Use the listed questions to define the documentation scope, and confirm that the manual explains installation, components, profile, targets, dependencies, and installation failures when finished.
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
- 38/100