rust-lang / rust-lang/docs.rs

Support a denylist for `all-features` Cargo metadata key

Open
#1,710 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-builds C-enhancement E-medium
Dominant language
Rust
Stars
1.2k
Forks
232
Avg merge
11h 35m
Merged PRs (30d)
60

Description

Docs.rs currently supports metadata of this format:

[package.metadata.docs.rs]
all-features = true

Sometimes crates have "private" features; which shouldn't be documented on docs.rs. It is possible to use doc(hidden) on these, but it would be preferable if docs were not broken for these features when they're actually desired.

It would be nice to be able to supply a denylist of features that do not get run with all-features. AIUI the code currently just passes --all-features in, so it would probably need to be tweaked to use cargo metadata to get the full feature list.

Contributor guide

No contributing guide indexed for this repository

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

The issue names no files or tests; start by locating where docs.rs passes Cargo's --all-features option and how package metadata is read. Check the Cargo metadata feature list and determine how a denylist could be applied. Done means crates can exclude selected private features while retaining all other features for documentation builds.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.