rust-lang / rust-lang/cargo

There is currently no way to specify features automatically when using `cargo doc`

Open
#8,905 33 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I thought at first about using [profile.doc], but it is doing nothing (as displayed by cargo itself) and there are no other way to do so.

Then I looked a bit deeper and noticed that you can't set features under profiles, making this not the right approach.

Therefore, I suggest adding a new section simply called "rustdoc" which would allow for now:

[rustdoc]
features = ["whatever"]

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 entry point and the existing [profile.doc] configuration behavior described in the issue. Review the discussion around adding a [rustdoc] section with a features setting, and consider the work complete when cargo doc can read that configuration and use the requested features.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.