mirror of
https://github.com/arnaucube/sonobe.git
synced 2026-01-08 15:01:30 +01:00
feat: Minimal in-browser compatibility for the crate (#149)
* change: CircomWrapper constructor to use raw bytes * chore: tmp update to latest circom-compat * feat: Introduce PathOrBin to support in-browser CircomWrapper usage This changes the associated type `Params` of the `CircomFCircuit` to use the newly created `PathOrBin` type. This allows the user of the lib to directly send the binary of the files already read or instead, provide a path to it and let `sonobe` do the work. With this, Circom should be already usable from the browser if we allow JS to take care of reading the `.wasm` and `.r1cs` files. * feat: Introduce PathOrBin to support in-browser NoirFCircuit usage This commit temporarilly stands on top of https://github.com/dmpierre/arkworks_backend/pull/1 referenced as `rev`. This changes the associated type `Params` of the `CircomFCircuit` to use the newly created `PathOrBin` type. This allows the user of the lib to directly send the binary of the files already read or instead, provide a path to it and let `sonobe` do the work. With this, Noir should be already usable from the browser if we allow JS to take care of reading the `circuit.json` files * chore: Update deps to branch instead of `rev` * fix: use PathOrBin in examples * fix: clippy * fix: read file length for initializing vec size --------- Co-authored-by: dmpierre <pdaixmoreux@gmail.com>
This commit is contained in:
@@ -61,7 +61,7 @@ fn main() {
|
||||
"./folding-schemes/src/frontend/circom/test_folder/with_external_inputs_js/with_external_inputs.wasm",
|
||||
);
|
||||
|
||||
let f_circuit_params = (r1cs_path, wasm_path, 1, 2);
|
||||
let f_circuit_params = (r1cs_path.into(), wasm_path.into(), 1, 2);
|
||||
let f_circuit = CircomFCircuit::<Fr>::new(f_circuit_params).unwrap();
|
||||
|
||||
pub type N =
|
||||
|
||||
Reference in New Issue
Block a user