Rustdoc --enable-index-page should work with --merge=finalize
Open
Nobody has claimed this yet.
C-bug
T-rustdoc
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Reproduction Steps
rustc --crate-type=rlib -o build/rlibs/liba.rlib --edition=2024 -Lbuild/rlibs --crate-name=a a.rs
rustc --crate-type=rlib -o build/rlibs/libb.rlib --edition=2024 -Lbuild/rlibs --crate-name=b b.rs
rustc --crate-type=rlib -o build/rlibs/libc.rlib --edition=2024 -Lbuild/rlibs --crate-name=c c.rs
rustdoc -Zunstable-options --parts-out-dir=build/doc/a/.parts -o build/doc/a --edition=2024 --crate-name=a --crate-version=0.1.0 --extern=a=build/rlibs/liba.rlib -Lbuild/rlibs a.rs
rustdoc -Zunstable-options --parts-out-dir=build/doc/b/.parts -o build/doc/b --edition=2024 --crate-name=b --crate-version=0.1.0 --extern=b=build/rlibs/libb.rlib -Lbuild/rlibs b.rs
rustdoc -Zunstable-options --parts-out-dir=build/doc/c/.parts -o build/doc/c --edition=2024 --crate-name=c --crate-version=0.1.0 --extern=c=build/rlibs/libc.rlib -Lbuild/rlibs c.rs
mkdir -p build/doc/merged
cp -r build/doc/a/* build/doc/merged
cp -r build/doc/b/* build/doc/merged
cp -r build/doc/c/* build/doc/merged
rustdoc -Zunstable-options --merge=finalize \
-o build/doc/merged \
--include-parts-dir=build/doc/a/.parts \
--include-parts-dir=build/doc/b/.parts \
--include-parts-dir=build/doc/c/.parts \
--enable-index-page
Expected Outcome
Top level index.html (maybe help.html and settings.html too)
Actual Output
No top level index page.
Version
rustdoc 1.88.0 (6b00bc388 2025-06-23)
binary: rustdoc
commit-hash: 6b00bc3880198600130e1cf62b8f8a93494488cc
commit-date: 2025-06-23
host: x86_64-unknown-linux-gnu
release: 1.88.0
LLVM version: 20.1.5
Additional Details
If we provide a crate do document in the finalize rustdoc command the index page is generated.
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 the rustdoc --merge=finalize command with --enable-index-page and the three --include-parts-dir arguments shown in the issue. Trace the finalize entry point and its handling of the index-page option; done means the merged output contains a top-level index.html, with help.html and settings.html if applicable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers, documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100