diff --git a/crates/librqbit/Cargo.toml b/crates/librqbit/Cargo.toml index 6b86dd4..8150d6b 100644 --- a/crates/librqbit/Cargo.toml +++ b/crates/librqbit/Cargo.toml @@ -6,9 +6,9 @@ edition = "2018" [features] default = ["sha1-openssl"] -sha1-system = ["crypto-hash"] -sha1-openssl = ["openssl"] -sha1-rust = ["sha1"] +sha1-system = ["sha1w/sha1-system"] +sha1-openssl = ["sha1w/sha1-openssl"] +sha1-rust = ["sha1w/sha1-openssl"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/crates/rqbit/Cargo.toml b/crates/rqbit/Cargo.toml index a7f0c51..48f601f 100644 --- a/crates/rqbit/Cargo.toml +++ b/crates/rqbit/Cargo.toml @@ -6,7 +6,10 @@ authors = ["Igor Katson "] edition = "2018" [features] -rt-single-thread = [] +default = ["sha1-openssl"] +sha1-system = ["librqbit/crypto-hash"] +sha1-openssl = ["librqbit/openssl"] +sha1-rust = ["librqbit/sha1"] [dependencies] librqbit = {path="../librqbit"} diff --git a/crates/sha1w/Cargo.toml b/crates/sha1w/Cargo.toml index 81fd3d0..110fb08 100644 --- a/crates/sha1w/Cargo.toml +++ b/crates/sha1w/Cargo.toml @@ -6,13 +6,10 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [features] -default = ["default-sha1-openssl"] +default = ["sha1-openssl"] sha1-system = ["crypto-hash"] sha1-openssl = ["openssl"] sha1-rust = ["sha1"] -default-sha1-openssl = ["sha1-openssl"] -default-sha1-rust = ["sha1-rust"] -default-sha1-system = ["sha1-system"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/crates/sha1w/src/lib.rs b/crates/sha1w/src/lib.rs index d761347..244fb0f 100644 --- a/crates/sha1w/src/lib.rs +++ b/crates/sha1w/src/lib.rs @@ -4,13 +4,13 @@ // leaving the pure-rust impl here too. Maybe someday make them // runtime swappable or enabled with a feature. -#[cfg(feature = "default-sha1-openssl")] +#[cfg(feature = "sha1-openssl")] pub type Sha1 = Sha1Openssl; -#[cfg(feature = "default-sha1-rust")] +#[cfg(feature = "sha1-rust")] pub type Sha1 = Sha1Rust; -#[cfg(feature = "default-sha1-system")] +#[cfg(feature = "sha1-system")] pub type Sha1 = Sha1System; pub trait ISha1 {