Skip to content

Commit

Permalink
Merge pull request #78 from epage/doc
Browse files Browse the repository at this point in the history
docs: Single-sourced cargo feature flags
  • Loading branch information
baoyachi committed Feb 22, 2022
2 parents 58b8fbd + e0fda2f commit 36d1903
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`:
Expand Down

0 comments on commit 36d1903

Please sign in to comment.