#documentation #features #rustdoc #macro

macro document-features

Extract documentation for the feature flags from comments in Cargo.toml

9 releases

0.2.7 Dec 21, 2022
0.2.6 Sep 24, 2022
0.2.3 Aug 15, 2022
0.2.2 Jul 25, 2022
0.1.0 Feb 1, 2022

#1 in #rustdoc

Download history 1543/week @ 2022-10-06 1463/week @ 2022-10-13 2370/week @ 2022-10-20 2707/week @ 2022-10-27 2978/week @ 2022-11-03 2223/week @ 2022-11-10 2046/week @ 2022-11-17 2043/week @ 2022-11-24 2349/week @ 2022-12-01 2523/week @ 2022-12-08 1941/week @ 2022-12-15 1990/week @ 2022-12-22 2979/week @ 2022-12-29 3763/week @ 2023-01-05 3093/week @ 2023-01-12 3392/week @ 2023-01-19

13,513 downloads per month
Used in 79 crates (71 directly)

MIT/Apache

29KB
698 lines

Document your crate's feature flags

Crates.io Documentation

This crate provides a macro that extracts documentation comments from Cargo.toml

To use this crate, add #![doc = document_features::document_features!()] in your crate documentation. The document_features!() macro reads your Cargo.toml file, extracts feature comments and generates a markdown string for your documentation.

Use ## and #! comments in your Cargo.toml to document features, for example:

[dependencies]
document-features = "0.2"
## ...

[features]
## The foo feature enables the `foo` functions
foo = []
## The bar feature enables the [`bar`] module
bar = []

#! ### Experimental features
#! The following features are experimental

## Activate the fusion reactor
fusion = []

These comments keep the feature definition and documentation next to each other, and they are then rendered into your crate documentation.

Check out the documentation for more details.

Contributions

Contributions are welcome. We accept pull requests and bug reports.

License

MIT OR Apache-2.0

Dependencies

~160KB