Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add an online mode for rustup doc #3588

Open
jyn514 opened this issue Dec 17, 2023 · 3 comments
Open

add an online mode for rustup doc #3588

jyn514 opened this issue Dec 17, 2023 · 3 comments
Milestone

Comments

@jyn514
Copy link
Member

jyn514 commented Dec 17, 2023

Problem you are trying to solve

rustup doc is very useful, but has a lot of edge cases. if you don't have rust-docs installed or the documentation is not packaged through static.rust-lang.org, you won't be able to read it. this requires people to download more, but more importantly, it greatly limits the number of places rustup can link (a few examples off the top of my head that are necessarily missing: crates.io, docs.rs, play.rust-lang.org, the security policy).

Solution you'd like

it would be great if rustup had a mode for opening online docs as well. my suggestion is something like this:

for existing docs, fallback to the online version if they're not installed locally (rustup already knows the channel names from the toolchain names so this should be fairly simple). if desired, rustup could have an --offline flag to disable this behavior.

for online-only docs, open the page directly (and give a hard error if --offline is passed)

for a list of links i think should be added, https://rust.tf/ is a good start - some of those are biased towards contributors, not users, but a lot of them are useful to both.

Notes

No response

@rbtcollins
Copy link
Contributor

What problem is this solving? That is what is the advantage of rustup linking you to crates.io vs googling it? Sorry if this sounds like I'm missing the point .. I probably am :)

Note that the assumption I'm starting from here is that rustup is only concerned with the language level docs - docs for crates, dependencies, etc are better handled by cargo doc or other cargo-aware tooling.

@jyn514
Copy link
Member Author

jyn514 commented Jan 7, 2024

What problem is this solving? That is what is the advantage of rustup linking you to crates.io vs googling it? Sorry if this sounds like I'm missing the point .. I probably am :)

Note that the assumption I'm starting from here is that rustup is only concerned with the language level docs

i would expect rustup to be concerned with documentation for the toolchain as a whole - not third-party crates, but all the official tooling. that's why rustup doc --cargo exists :) why not also document clippy (https://rust-lang.github.io/rust-clippy/master/index.html / https://doc.rust-lang.org/nightly/clippy/) and rustfmt (https://rust-lang.github.io/rustfmt/) as well? (clippy actually seems to be installed already, there's just no CLI option for it)

i would also consider docs.rs and crates.io to be part of the toolchain, even though they're concerned with crates, because they're official projects of the rust organization. i feel similarly about the security policy.

@jyn514
Copy link
Member Author

jyn514 commented Jan 7, 2024

in general the advantage of rustup doc is that you know it's an official rust project by the fact that rustup supports it. googling crates.io doesn't give you that certainty.

@rami3l rami3l added this to the On Deck milestone Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants