Issue: When I run cargo doc --open, it successfully documents all dependencies (I can see "Documenting rand v0.8.5" in the output), but it only opens my crate's documentation page. There's no visible way to navigate to the randdocumentation or other dependencies from the opened page.
Expected: Based on examples in the Rust book and docs.rs, I expected to see links or a sidebar to browse dependency documentation, similar to how docs.rs interconnects all crate docs.
Current Workaround: I have to manually open target/doc/rand/index.html or edit the URL path directly.
Question: Is this intended behavior? Is there a better way to access dependency documentation locally that I'm missing as a beginner?
unless you are using custom style sheets, on the index page of your own crate (or of any crate, for that matter), on the left sidebar, where you have groups like "all items", "sections", "crate items", at the bottom of which should be a group labeled "crates", you'll find all the dependency crates in the list.
if you don't see them in the sidebar, can you check the content of the target/doc/crates.js file? it should contain a list of all the crates documented by cargo doc.
I can confirm the same issue as @NabilJada . I do not use any custom style sheets and simply follow the Rust Book and the very first example with the Guessing Game implementation. After running cargo doc --open I see the following
This appears relevant, and the comments contain suggested solutions:
In particular:
On macOS Sonoma (14.1.1), Safari 17.1, you need to go to Settings and then the Advanced tab and enable
Show features for web developers
Setting up new computer on macOS 14.3. Turning on developer mode by itself did not fix my issue. But turning on developer mode then quitting Safari did fix it.