Use explicit crate features (#100)
This commit is contained in:
+5
-5
@@ -14,10 +14,10 @@ version = "0.5.0-pre.1"
|
|||||||
[features]
|
[features]
|
||||||
alloc = []
|
alloc = []
|
||||||
danger = []
|
danger = []
|
||||||
default = ["ristretto255-ciphersuite", "serde"]
|
default = ["ristretto255-ciphersuite", "dep:serde"]
|
||||||
ristretto255 = ["curve25519-dalek", "generic-array/more_lengths"]
|
ristretto255 = ["dep:curve25519-dalek", "generic-array/more_lengths"]
|
||||||
ristretto255-ciphersuite = ["ristretto255", "sha2"]
|
ristretto255-ciphersuite = ["ristretto255", "dep:sha2"]
|
||||||
serde = ["generic-array/serde", "serde_"]
|
serde = ["generic-array/serde", "dep:serde"]
|
||||||
std = ["alloc"]
|
std = ["alloc"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
@@ -35,7 +35,7 @@ elliptic-curve = { version = "0.12", features = [
|
|||||||
] }
|
] }
|
||||||
generic-array = "0.14"
|
generic-array = "0.14"
|
||||||
rand_core = { version = "0.6", default-features = false }
|
rand_core = { version = "0.6", default-features = false }
|
||||||
serde_ = { version = "1", package = "serde", default-features = false, features = [
|
serde = { version = "1", default-features = false, features = [
|
||||||
"derive",
|
"derive",
|
||||||
], optional = true }
|
], optional = true }
|
||||||
sha2 = { version = "0.10", default-features = false, optional = true }
|
sha2 = { version = "0.10", default-features = false, optional = true }
|
||||||
|
|||||||
+4
-4
@@ -72,7 +72,7 @@ impl Mode {
|
|||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
feature = "serde",
|
feature = "serde",
|
||||||
derive(serde::Deserialize, serde::Serialize),
|
derive(serde::Deserialize, serde::Serialize),
|
||||||
serde(crate = "serde", bound = "")
|
serde(bound = "")
|
||||||
)]
|
)]
|
||||||
pub struct BlindedElement<CS: CipherSuite>(
|
pub struct BlindedElement<CS: CipherSuite>(
|
||||||
#[cfg_attr(feature = "serde", serde(with = "Element::<CS::Group>"))]
|
#[cfg_attr(feature = "serde", serde(with = "Element::<CS::Group>"))]
|
||||||
@@ -89,7 +89,7 @@ where
|
|||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
feature = "serde",
|
feature = "serde",
|
||||||
derive(serde::Deserialize, serde::Serialize),
|
derive(serde::Deserialize, serde::Serialize),
|
||||||
serde(crate = "serde", bound = "")
|
serde(bound = "")
|
||||||
)]
|
)]
|
||||||
pub struct EvaluationElement<CS: CipherSuite>(
|
pub struct EvaluationElement<CS: CipherSuite>(
|
||||||
#[cfg_attr(feature = "serde", serde(with = "Element::<CS::Group>"))]
|
#[cfg_attr(feature = "serde", serde(with = "Element::<CS::Group>"))]
|
||||||
@@ -106,7 +106,7 @@ where
|
|||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
feature = "serde",
|
feature = "serde",
|
||||||
derive(serde::Deserialize, serde::Serialize),
|
derive(serde::Deserialize, serde::Serialize),
|
||||||
serde(crate = "serde", bound = "")
|
serde(bound = "")
|
||||||
)]
|
)]
|
||||||
pub struct PreparedEvaluationElement<CS: CipherSuite>(pub(crate) EvaluationElement<CS>)
|
pub struct PreparedEvaluationElement<CS: CipherSuite>(pub(crate) EvaluationElement<CS>)
|
||||||
where
|
where
|
||||||
@@ -120,7 +120,7 @@ where
|
|||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
feature = "serde",
|
feature = "serde",
|
||||||
derive(serde::Deserialize, serde::Serialize),
|
derive(serde::Deserialize, serde::Serialize),
|
||||||
serde(crate = "serde", bound = "")
|
serde(bound = "")
|
||||||
)]
|
)]
|
||||||
pub struct Proof<CS: CipherSuite>
|
pub struct Proof<CS: CipherSuite>
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -555,9 +555,6 @@ extern crate alloc;
|
|||||||
#[cfg(feature = "std")]
|
#[cfg(feature = "std")]
|
||||||
extern crate std;
|
extern crate std;
|
||||||
|
|
||||||
#[cfg(feature = "serde")]
|
|
||||||
extern crate serde_ as serde;
|
|
||||||
|
|
||||||
mod ciphersuite;
|
mod ciphersuite;
|
||||||
mod common;
|
mod common;
|
||||||
mod error;
|
mod error;
|
||||||
|
|||||||
+2
-2
@@ -41,7 +41,7 @@ use crate::{CipherSuite, Error, Group, Result};
|
|||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
feature = "serde",
|
feature = "serde",
|
||||||
derive(serde::Deserialize, serde::Serialize),
|
derive(serde::Deserialize, serde::Serialize),
|
||||||
serde(crate = "serde", bound = "")
|
serde(bound = "")
|
||||||
)]
|
)]
|
||||||
pub struct OprfClient<CS: CipherSuite>
|
pub struct OprfClient<CS: CipherSuite>
|
||||||
where
|
where
|
||||||
@@ -59,7 +59,7 @@ where
|
|||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
feature = "serde",
|
feature = "serde",
|
||||||
derive(serde::Deserialize, serde::Serialize),
|
derive(serde::Deserialize, serde::Serialize),
|
||||||
serde(crate = "serde", bound = "")
|
serde(bound = "")
|
||||||
)]
|
)]
|
||||||
pub struct OprfServer<CS: CipherSuite>
|
pub struct OprfServer<CS: CipherSuite>
|
||||||
where
|
where
|
||||||
|
|||||||
+3
-3
@@ -41,7 +41,7 @@ use crate::{CipherSuite, Error, Group, Result};
|
|||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
feature = "serde",
|
feature = "serde",
|
||||||
derive(serde::Deserialize, serde::Serialize),
|
derive(serde::Deserialize, serde::Serialize),
|
||||||
serde(crate = "serde", bound = "")
|
serde(bound = "")
|
||||||
)]
|
)]
|
||||||
pub struct PoprfClient<CS: CipherSuite>
|
pub struct PoprfClient<CS: CipherSuite>
|
||||||
where
|
where
|
||||||
@@ -61,7 +61,7 @@ where
|
|||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
feature = "serde",
|
feature = "serde",
|
||||||
derive(serde::Deserialize, serde::Serialize),
|
derive(serde::Deserialize, serde::Serialize),
|
||||||
serde(crate = "serde", bound = "")
|
serde(bound = "")
|
||||||
)]
|
)]
|
||||||
pub struct PoprfServer<CS: CipherSuite>
|
pub struct PoprfServer<CS: CipherSuite>
|
||||||
where
|
where
|
||||||
@@ -541,7 +541,7 @@ pub type PoprfServerBatchEvaluatePreparedEvaluationElements<CS, I> = Map<
|
|||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
feature = "serde",
|
feature = "serde",
|
||||||
derive(serde::Deserialize, serde::Serialize),
|
derive(serde::Deserialize, serde::Serialize),
|
||||||
serde(crate = "serde", bound = "")
|
serde(bound = "")
|
||||||
)]
|
)]
|
||||||
pub struct PoprfPreparedTweak<CS: CipherSuite>(
|
pub struct PoprfPreparedTweak<CS: CipherSuite>(
|
||||||
#[cfg_attr(feature = "serde", serde(with = "Scalar::<CS::Group>"))]
|
#[cfg_attr(feature = "serde", serde(with = "Scalar::<CS::Group>"))]
|
||||||
|
|||||||
+2
-2
@@ -39,7 +39,7 @@ use crate::{CipherSuite, Error, Group, Result};
|
|||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
feature = "serde",
|
feature = "serde",
|
||||||
derive(serde::Deserialize, serde::Serialize),
|
derive(serde::Deserialize, serde::Serialize),
|
||||||
serde(crate = "serde", bound = "")
|
serde(bound = "")
|
||||||
)]
|
)]
|
||||||
pub struct VoprfClient<CS: CipherSuite>
|
pub struct VoprfClient<CS: CipherSuite>
|
||||||
where
|
where
|
||||||
@@ -59,7 +59,7 @@ where
|
|||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
feature = "serde",
|
feature = "serde",
|
||||||
derive(serde::Deserialize, serde::Serialize),
|
derive(serde::Deserialize, serde::Serialize),
|
||||||
serde(crate = "serde", bound = "")
|
serde(bound = "")
|
||||||
)]
|
)]
|
||||||
pub struct VoprfServer<CS: CipherSuite>
|
pub struct VoprfServer<CS: CipherSuite>
|
||||||
where
|
where
|
||||||
|
|||||||
Reference in New Issue
Block a user