Add cargo doc
flag or functionality to open docs at a specific crate
#10516
Labels
C-feature-request
Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Command-doc
Problem
I believe it may be useful to add a flag or functionality to choose what crate
cargo doc --open
opens to. For repositories with a lot of local crates, this could be useful for newcomers who want to know where to start.A current workaround is to generate docs for all crates and then package the specific crate you want.
However, that workaround requires circumstantial knowledge of
cargo doc
. Perhaps, the spirit of what this is trying to accomplish can be achieved in onecargo doc
command.Proposed Solution
I haven't dug too deep into the
cargo doc
codebase yet, but generally, the solution could look like the following:Alternatively or additionally, users could specify a "default docs crate" that
cargo doc --open
opens to.Notes
This functionality might already exist and I could be missing something! Thanks for reading and for all contributors to
cargo
.Similar issue: #3805
For opening to a specific mod, see #10516
The text was updated successfully, but these errors were encountered: