Skip to content

Hide windows-sys's documentation behind a feature flag? #2665

@LikeLakers2

Description

@LikeLakers2

Suggestion

Hi! I've been building a program that uses the bevy game engine crate, and in the midst of this, I've found it useful to render documentation for everything via cargo doc.

However, I noticed that the windows-sys crate generates quite a lot of documentation. Unfortunately, cargo doc has no way to exclude certain dependencies without excluding all dependencies (the --exclude flag only seems to work on packages that are within the current workspace).

I don't believe this is an issue with the windows-sys crate, per se - it's doing its job just fine. However, unless a user is using windows-sys directly, they may not need to see windows-sys's documentation anyways - meaning windows-sys's documentation is simply wasting disk space, and worse, making cargo clean take a lot longer due to the mass amount of files generated.

Still, some users may need windows-sys's docs, so hiding them behind a blanket #[doc(hidden)] may not be a good idea. Perhaps windows-sys could attach #[doc(hidden)] to most stuff, unless a certain feature flag (let's say windows-sys/render_docs) is specified?

I just think it may be useful to avoid generating so much documentation unless a user needs it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions