rust-lang / rust-lang/cargo

doc: make root directory configurable

Open
#10,089 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-feature-request Command-doc S-needs-design
Dominant language
Rust
Stars
15.5k
Forks
3k
Avg merge
23h 30m
Merged PRs (30d)
51

Description

Problem

For cargo install, we have [install] root = "..", which allows the configuration (or a command-line flag) to dictate where the documentation should end up. It'd be nice to have a similar configuration option to allow customizing Cargo so that it directly generates its documentation into, say, a directory that's being served up by a local web server already.

Proposed Solution

Add a new root key to [doc], and a corresponding --root argument to cargo doc that dictates where the generated documentation should be placed.

Notes

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the cargo doc command and the configuration documentation sections for [doc] and [install], which the issue links. Trace how cargo doc selects its output directory and how cargo install handles its existing root setting. Done means a [doc] root configuration key and a cargo doc --root argument consistently place generated documentation in the requested directory, with documentation covering both options.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, documentation
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.