include constants file into exec

This commit is contained in:
Dmitriy Ryajov 2023-04-10 18:12:31 -06:00
parent cce59a4f22
commit bce430f507
No known key found for this signature in database
GPG Key ID: DA8C680CE7C657A4

View File

@ -5,13 +5,10 @@ use num_bigint::BigUint;
use once_cell::sync::Lazy;
use num_traits::Num;
const CONSTANTS_STR: &str = include_str!("poseidon_constants_opt.json");
pub static CONSTANTS: Lazy<serde_json::Value> = Lazy::new(|| {
let file = File::open(
"./src/poseidon/poseidon_constants_opt.json",
)
.unwrap();
// Read the JSON contents of the file as an instance of `User`.
serde_json::from_reader(BufReader::new(file)).unwrap()
serde_json::from_str(CONSTANTS_STR).unwrap()
});
pub static C_CONST: Lazy<Vec<Vec<Fr>>> = Lazy::new(|| {