diff options
author | Ryan Lopopolo <rjl@hyperbo.la> | 2019-09-05 15:28:59 -0700 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2019-09-17 09:35:52 +0900 |
commit | b8b1fe2e41ef54db2e7221587669fd8188ed394c (patch) | |
tree | f60a89c1771f874e6b264e163102a8159a020ad2 | |
parent | ac99aa14097aaa7cf09e8f9cf74449d2f84de155 (diff) |
Add which-rustfmt feature
This feature controls whether bindgen will use the which crate to detect
the rustfmt binary. This makes which an optional dependency.
which-rustfmt is a default feature which makes this change backward compatible.
-rw-r--r-- | Cargo.toml | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -54,7 +54,7 @@ lazy_static = "1" peeking_take_while = "0.1.2" quote = { version = "1", default-features = false } regex = "1.0" -which = ">=1.0, <3.0" +which = { version = ">=1.0, <3.0", optional = true } shlex = "0.1" fxhash = "0.2" # New validation in 0.3.6 breaks bindgen-integration: @@ -70,9 +70,11 @@ optional = true version = "0.4" [features] -default = ["logging", "clap"] +default = ["logging", "clap", "which-rustfmt"] logging = ["env_logger", "log"] static = [] +# Dynamically discover a `rustfmt` binary using the `which` crate +which-rustfmt = ["which"] # These features only exist for CI testing -- don't use them if you're not hacking # on bindgen! |