Skip to content

Commit

Permalink
feat(fflonk): non-default allocator feature (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
saitima authored Jan 10, 2025
1 parent b241b29 commit debf9a3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crates/fflonk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -22,5 +22,6 @@ bincode = "1.3"
byteorder = "1"

[features]
default = ["sanity"]
default = ["franklin-crypto"]
sanity = []
allocator = ["franklin-crypto/allocator"]
3 changes: 3 additions & 0 deletions crates/fflonk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<E, S, A = std::alloc::Global> = Assembly<E, PlonkCsWidth3Params, NaiveMainGate, S, A>;
#[cfg(not(feature = "allocator"))]
pub type FflonkAssembly<E, S> = Assembly<E, PlonkCsWidth3Params, NaiveMainGate, S>;

0 comments on commit debf9a3

Please sign in to comment.