circom-compat/src/circom_wasm/mod.rs
src/circom_wasm/mod.rsRaw
1mod wasm;
2pub use wasm::WitnessCalculator;
3
4mod memory;
5pub use memory::SafeMemory;
6
7mod circom;
8pub use circom::CircomInstance;
9
10use fnv::FnvHasher;
11use std::hash::Hasher;
12
13pub use num_bigint::BigInt;
14
15pub(crate) fn fnv(inp: &str) -> (u32, u32) {
16 let mut hasher = FnvHasher::default();
17 hasher.write(inp.as_bytes());
18 let h = hasher.finish();
19
20 ((h >> 32) as u32, h as u32)
21}