Bug: 257493879

Clone this repo:
  1. 0b7f3d0 Upgrade document-features to 0.2.8 am: eb005c010f by Jeff Vander Stoep · 3 months ago main master
  2. eb005c0 Upgrade document-features to 0.2.8 by Jeff Vander Stoep · 3 months ago
  3. e5601e6 Migrate to cargo_embargo. am: efe366f7f8 am: e7b40e98b0 am: f8a929a7a3 by Andrew Walbran · 5 months ago
  4. 1f9dad4 Migrate to cargo_embargo. am: efe366f7f8 am: 714b322ba4 am: df6ebc77f7 by Andrew Walbran · 5 months ago
  5. f8a929a Migrate to cargo_embargo. am: efe366f7f8 am: e7b40e98b0 by Andrew Walbran · 5 months ago

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