Merge pull request #120 from jonasnick/endomorphism-feature

Move libsecp USE_ENDOMORPHISM option behind non-default feature flag
This commit is contained in:
Tim Ruffing 2019-06-13 17:34:14 +02:00 committed by GitHub
commit 0fbc0f99ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 4 deletions

View File

@ -24,11 +24,11 @@ script:
- cargo build --verbose --features=rand
- cargo test --verbose --features=rand
- cargo test --verbose --features="rand serde"
- cargo test --verbose --features="rand serde recovery"
- cargo test --verbose --features="rand serde recovery endomorphism"
- cargo build --verbose --no-default-features
- cargo build --verbose --no-default-features --features="serde"
- cargo build --verbose --no-default-features --features="rand"
- cargo build --verbose --no-default-features --features="rand serde recovery"
- cargo build --verbose --no-default-features --features="rand serde recovery endomorphism"
- cargo build --verbose --no-default-features --features="fuzztarget recovery"
- cargo build --verbose
- cargo test --verbose

View File

@ -15,7 +15,7 @@ build = "build.rs"
# Should make docs.rs show all functions, even those behind non-default features
[package.metadata.docs.rs]
features = [ "rand", "serde", "recovery" ]
features = [ "rand", "serde", "recovery", "endomorphism" ]
all-features = true
[build-dependencies]
@ -31,6 +31,7 @@ default = ["std"]
fuzztarget = []
std = []
recovery = []
endomorphism = []
[dev-dependencies]
rand = "0.6"

View File

@ -52,9 +52,10 @@ fn main() {
.define("USE_NUM_NONE", Some("1"))
.define("USE_FIELD_INV_BUILTIN", Some("1"))
.define("USE_SCALAR_INV_BUILTIN", Some("1"))
.define("USE_ENDOMORPHISM", Some("1"))
.define("ENABLE_MODULE_ECDH", Some("1"));
#[cfg(feature = "endomorphism")]
base_config.define("USE_ENDOMORPHISM", Some("1"));
#[cfg(feature = "recovery")]
base_config.define("ENABLE_MODULE_RECOVERY", Some("1"));