summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2023-03-27 08:28:16 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2023-03-27 08:28:16 +0900
commit201409143b85f76b1cf4f62085a88519a9fcea94 (patch)
tree33cad49992bbc5bbabe7de73d74d1815a9ad8828 /README.md
downloadrust-document-features-201409143b85f76b1cf4f62085a88519a9fcea94.tar.gz
rust-document-features-201409143b85f76b1cf4f62085a88519a9fcea94.tar.bz2
rust-document-features-201409143b85f76b1cf4f62085a88519a9fcea94.zip
Import document-features 0.2.7upstream/0.2.7upstream
Diffstat (limited to 'README.md')
-rw-r--r--README.md43
1 files changed, 43 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..81fccc0
--- /dev/null
+++ b/README.md
@@ -0,0 +1,43 @@
+# Document your crate's feature flags
+
+[![Crates.io](https://img.shields.io/crates/v/document-features)](https://crates.io/crates/document-features)
+[![Documentation](https://docs.rs/document-features/badge.svg)](https://docs.rs/document-features/)
+
+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:
+
+```toml
+[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](https://docs.rs/document-features/) for more details.
+
+## Contributions
+
+Contributions are welcome. We accept pull requests and bug reports.
+
+## License
+
+MIT OR Apache-2.0