Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to add a description to the features. #11290

Closed
Jerrody opened this issue Oct 26, 2022 · 2 comments
Closed

Add ability to add a description to the features. #11290

Jerrody opened this issue Oct 26, 2022 · 2 comments
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`

Comments

@Jerrody
Copy link

Jerrody commented Oct 26, 2022

Problem

It's very often to understand what the feature of the N crate does and as a rule maintaners neglect to add the description to the feature in documentation. And the user of this crate cannot understand what feature does, for an example:
nalgebra crate has a cuda feature. What does it mean? Do all math computations perform on the GPU?
In reality, when I asked the maintainer in Discord server what it does he said that this is for interop with CUDA.

Proposed Solution

Add additional field to the feature, like:
my_feature = { features = ["dep:serde", "another_feature"], description = "This is does cool magic" }

And add an option to the maintainer if he doesn't want to add any description to the feature:
my_feature = { features = ["dep:serde", "another_feature"], description = false }

And after this rustdoc parses it or Cargo provides additional data to it and as the result we can see at this page description of each feature (just imagine how it can looks like):
image

Notes

No response

@Jerrody Jerrody added the C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` label Oct 26, 2022
@weihanglo
Copy link
Member

Thanks for your proposal.

This seems to be a duplicate of #4956, and there is a kinda tracking issue #10882 for some extensions of feature field. Closing in favour of those. Thank you.

@weihanglo weihanglo closed this as not planned Won't fix, can't repro, duplicate, stale Oct 26, 2022
@Jerrody
Copy link
Author

Jerrody commented Oct 26, 2022

Thanks for your proposal.

This seems to be a duplicate of #4956, and there is a kinda tracking issue #10882 for some extensions of feature field. Closing in favour of those. Thank you.

Alright.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Projects
None yet
Development

No branches or pull requests

2 participants