diff --git a/Cargo.toml b/Cargo.toml index 80c7913..a652bb6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,11 +12,21 @@ license = "MIT AND Apache-2.0" exclude = ["shadow-rs.png"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[package.metadata.docs.rs] +all-features = true + [dependencies] is_debug = "1.0.1" chrono = "0.4.13" + +#! Optional Dependencies: + +## Use `libgit2` as a backend for git operations git2 = { version = "0.13.20", default-features = false, optional = true } +document-features = { version = "0.2", optional = true } + [features] default = ["git2"] diff --git a/src/lib.rs b/src/lib.rs index 33a7aaa..aa231bb 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -78,6 +78,7 @@ //! [build-dependencies] //! shadow-rs = "0.7" //! ``` +#![cfg_attr(feature = "document-features", doc = document_features::document_features!())] //! //! ### 2) Create `build.rs` file //! Now in the root of your project (same directory as `Cargo.toml`) add a file `build.rs`: