Add bitcoin_hashes dependency, rename some features
Because features and dependencies share the same namespace, and we want to pass down the optional dependence on serde to bitcoin_hashes, we need to rename the feature to something other than serde. Right now only features can be passed down to dependencies. Note that we could have also renamed the dependency to something like serde-dep and kept the same feature name, however, dependency renaming has only been available since cargo 0.27.0 Features that represent optional dependencies have been prefixed with 'use-'. The travis file has also been modified to conform to this change.
This commit is contained in:
parent
b6ec6a0d62
commit
b88f00c698
|
@ -14,8 +14,8 @@ script:
|
||||||
- cargo test --verbose
|
- cargo test --verbose
|
||||||
- cargo build --verbose --features=bitcoinconsensus
|
- cargo build --verbose --features=bitcoinconsensus
|
||||||
- cargo test --verbose --features=bitcoinconsensus
|
- cargo test --verbose --features=bitcoinconsensus
|
||||||
- cargo build --verbose --features=serde
|
- cargo build --verbose --features=use-serde
|
||||||
- cargo test --verbose --features=serde
|
- cargo test --verbose --features=use-serde
|
||||||
- cargo build --verbose --features=serde-decimal
|
- cargo build --verbose --features=serde-decimal
|
||||||
- cargo test --verbose --features=serde-decimal
|
- cargo test --verbose --features=serde-decimal
|
||||||
- if [ "$(rustup show | grep default | grep stable)" != "" ]; then cd fuzz && cargo test --verbose && ./travis-fuzz.sh; fi
|
- if [ "$(rustup show | grep default | grep stable)" != "" ]; then cd fuzz && cargo test --verbose && ./travis-fuzz.sh; fi
|
||||||
|
|
|
@ -15,15 +15,17 @@ name = "bitcoin"
|
||||||
path = "src/lib.rs"
|
path = "src/lib.rs"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
fuzztarget = ["secp256k1/fuzztarget"]
|
fuzztarget = ["secp256k1/fuzztarget", "bitcoin_hashes/fuzztarget"]
|
||||||
serde-decimal = ["serde", "strason"]
|
serde-decimal = ["use-serde", "strason"]
|
||||||
unstable = []
|
unstable = []
|
||||||
|
use-serde = ["serde", "bitcoin_hashes/serde"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bitcoin-bech32 = "0.8.0"
|
bitcoin-bech32 = "0.8.0"
|
||||||
byteorder = "1.2"
|
byteorder = "1.2"
|
||||||
rand = "0.3"
|
rand = "0.3"
|
||||||
rust-crypto = "0.2"
|
rust-crypto = "0.2"
|
||||||
|
bitcoin_hashes = "0.3"
|
||||||
bitcoinconsensus = { version = "0.16", optional = true }
|
bitcoinconsensus = { version = "0.16", optional = true }
|
||||||
|
|
||||||
[dependencies.serde]
|
[dependencies.serde]
|
||||||
|
|
|
@ -42,6 +42,7 @@
|
||||||
#![deny(missing_docs)]
|
#![deny(missing_docs)]
|
||||||
|
|
||||||
extern crate bitcoin_bech32;
|
extern crate bitcoin_bech32;
|
||||||
|
extern crate bitcoin_hashes;
|
||||||
extern crate byteorder;
|
extern crate byteorder;
|
||||||
extern crate crypto;
|
extern crate crypto;
|
||||||
extern crate hex;
|
extern crate hex;
|
||||||
|
|
Loading…
Reference in New Issue