Description
Problem you are trying to solve
i came up recently with this case in Rustlings, where i wanted the hints in the exercises to point out sections of the book to be cross-referenced when completely offline, but all the hints in those exercises links to online resources instead.
main problem is, someone pointed out there's way too many variables to keep track of to be worth maintained in Rustlings alone, ranging from browser installation checks, to the file URLs which Rustup already handles. so the current options in Rustlings' side as of now may become either make the user setup a Hosts file redirect into the offline book, or omit links altogether and just hint the user to the chapter section and the existence of the rustup doc
commands, as opposed to having both the links and the commands on all relevant hints.
so my thought with this was, if it was maintained on Rustup's side instead, that'll probably be worth it better since it's gonna become easily accessible outside anyway.
Solution you'd like
the access would be made for commands like
$ rustup doc --book chapter-part[-section[-subsection]]
for instance,
$ rustup doc --book 03-05-02-02
#not sure if this would require changing how all the HTML page links and headers are written
would ammount to file:///…/book/ch03-05-control-flow.html#returning-values-from-loops
but maybe an easier approach could be to instead index all headers in the book together and make them accessible by name directly like so:
#this does the same except it's easier to see where you're going to from the start.
$ rustup doc --book returning-values-from-loops
i think this would enable for easier access to notes and not just the use for the initial learning of the language. what do you think?
Notes
No response