Crates.io | document-features |
lib.rs | document-features |
version | 0.2.10 |
source | src |
created_at | 2022-02-01 16:47:37.171802 |
updated_at | 2024-07-12 20:59:47.617573 |
description | Extract documentation for the feature flags from comments in Cargo.toml |
homepage | https://slint.rs |
repository | https://github.com/slint-ui/document-features |
max_upload_size | |
id | 525277 |
size | 48,697 |
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 are welcome. We accept pull requests and bug reports.
MIT OR Apache-2.0