From 920f222f2b121fd031b2820fc15b6fb7b699a126 Mon Sep 17 00:00:00 2001 From: saitima Date: Fri, 10 Jan 2025 19:17:12 +0300 Subject: [PATCH] feat(fflonk): non-default allocator feature --- crates/fflonk/Cargo.toml | 5 +++-- crates/fflonk/src/lib.rs | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/crates/fflonk/Cargo.toml b/crates/fflonk/Cargo.toml index c7f2ac3..6890e07 100644 --- a/crates/fflonk/Cargo.toml +++ b/crates/fflonk/Cargo.toml @@ -11,7 +11,7 @@ categories.workspace = true description = "Reference implementation of fflonk prover and verifier" [dependencies] -franklin-crypto = { workspace = true, features = ["allocator"] } +franklin-crypto = { workspace = true, optional = true, default-features = true} num-bigint = { version = "0.4", features = ["serde"] } num-traits = "0.2" rand = "0.4" @@ -22,5 +22,6 @@ bincode = "1.3" byteorder = "1" [features] -default = ["sanity"] +default = ["franklin-crypto"] sanity = [] +allocator = ["franklin-crypto/allocator"] \ No newline at end of file diff --git a/crates/fflonk/src/lib.rs b/crates/fflonk/src/lib.rs index ed8b43b..483492b 100644 --- a/crates/fflonk/src/lib.rs +++ b/crates/fflonk/src/lib.rs @@ -44,4 +44,7 @@ mod test; pub const L1_VERIFIER_DOMAIN_SIZE_LOG: usize = 23; pub const MAX_COMBINED_DEGREE_FACTOR: usize = 9; pub(crate) const SANITY_CHECK: bool = true; +#[cfg(feature = "allocator")] pub type FflonkAssembly = Assembly; +#[cfg(not(feature = "allocator"))] +pub type FflonkAssembly = Assembly;