Skip to content

Commit

Permalink
Get things to compile after refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
cronokirby committed Jan 12, 2024
1 parent b51a3dc commit ceb9338
Show file tree
Hide file tree
Showing 21 changed files with 1,054 additions and 2,733 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ ark-bls12-377 = "0.4"
ark-ed-on-bls12-377 = { version = "0.4", features = ["r1cs"] }
ark-groth16 = { version = "0.4", default-features=false, optional=true }
ark-snark = { version = "0.4", optional=true }
cfg-if = "1.0"
zeroize = {version ="1.7", default-features=false}
hashbrown = "0.14.3"

Expand Down
7 changes: 7 additions & 0 deletions proptest-regressions/fields/fp/arkworks.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Seeds for failure cases proptest has generated in the past. It is
# automatically read and these particular cases re-run before any
# novel cases are generated.
#
# It is recommended to check this file in to source control so that
# everyone who runs the test benefits from these saved cases.
cc cdd619576f50197f2531266a43db3be354532b33cd74b87be7ca92df4a5c0715 # shrinks to a = Fp(0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000)
71 changes: 0 additions & 71 deletions src/fields/constants.rs

This file was deleted.

27 changes: 26 additions & 1 deletion src/fields/fp.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,31 @@
// Fiat-crypto generates some unused type aliases, but we don't want to edit the generated code at all.
#![allow(dead_code)]

use cfg_if::cfg_if;

pub mod arkworks;
pub mod u32;
pub mod u64;
pub mod arkworks;

#[cfg(all(not(feature = "u32"), not(feature = "u64")))]
// compile_error!("No backend selected. Please select either: 'u32_backend' or 'u64_backend'.");
#[cfg(all(feature = "u32", feature = "u64"))]
compile_error!(
"Multiple backends selected. Please select only one: 'u32_backend' or 'u64_backend'."
);

cfg_if! {
if #[cfg(feature = "u32")] {
pub type Fp = u32::Fp;

pub mod arkworks_constants {
pub use super::u32::arkworks_constants::*;
}
} else {
pub type Fp = u64::Fp;

pub mod arkworks_constants {
pub use super::u64::arkworks_constants::*;
}
}
}
Loading

0 comments on commit ceb9338

Please sign in to comment.