rfcs icon indicating copy to clipboard operation
rfcs copied to clipboard

RFC: Cargo feature descriptions

Open tgross35 opened this issue 2 years ago • 28 comments

Rendered

RFC for feature-documentation RFC goals: add a way to write feature descriptions in Cargo.toml

This was split from https://github.com/rust-lang/rfcs/pull/3416

[features]
# current configuration
foo = []
# Add a description to the feature
bar = { enables = ["foo"], doc = "simple docstring here"}

# Features can also be full tables if descriptions are longer
[features.qux]
enables = ["bar", "baz"]
doc = """
# qux

This could be a longer description of this feature
"""

This would resolve https://github.com/rust-lang/cargo/issues/4956

FCP

tgross35 avatar Sep 09 '23 22:09 tgross35