From bce430f507bfad473c71a7266b436ae67411e9d8 Mon Sep 17 00:00:00 2001 From: Dmitriy Ryajov Date: Mon, 10 Apr 2023 18:12:31 -0600 Subject: [PATCH] include constants file into exec --- src/poseidon/constants.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/poseidon/constants.rs b/src/poseidon/constants.rs index 813a336..eb4ed59 100644 --- a/src/poseidon/constants.rs +++ b/src/poseidon/constants.rs @@ -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 = 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>> = Lazy::new(|| {