Issues with `cargo doc --open`
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 15.5k
- Forks
- 3k
- Avg merge
- 23h 30m
- Merged PRs (30d)
- 51
Description
Hey all,
I am trying to understand how to use cargo doc locally and not sure if I am encountering a bug or just using it wrong.
When is run cargo doc --open my browser opens to some file store in /run/user/1000/doc/. However that folder only contains an index.html and nothing else.
As a result, I can look at the initial page of the documentation but all links it contains are broken and the style sheet does not seem to load properly either. See the image below:

Cargo version is 1.46.0-nightly (c26576f9a 2020-06-23) but I have experienced this with older versions as well.
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 by reproducing cargo doc --open with the reported Cargo version and inspect the generated documentation directory. Done means the browser opens a complete documentation site, with internal links and stylesheets loading instead of only index.html.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system, cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100