File tree Expand file tree Collapse file tree 7 files changed +17
-18
lines changed
Expand file tree Collapse file tree 7 files changed +17
-18
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ cp "${GIT_ROOT}/rust-toolchain" .
1515rustup target add wasm32-unknown-unknown wasm32-wasi
1616
1717# add dependencies
18- cargo add --path " ${GIT_ROOT} /folding-schemes" --features wasm, parallel
18+ cargo add --path " ${GIT_ROOT} /folding-schemes" --features circom-browser
1919cargo add getrandom --features js --target wasm32-unknown-unknown
2020
2121# test build for wasm32-* targets
Original file line number Diff line number Diff line change 4343 feature_set : [basic]
4444 include :
4545 - feature_set : basic
46- features : --features default,light-test
46+ features : --features default, light-test
4747 steps :
4848 - uses : actions/checkout@v2
4949 - uses : actions-rs/toolchain@v1
9999 uses : actions-rs/cargo@v1
100100 with :
101101 command : build
102- args : -p folding-schemes --no-default-features -- target ${{ matrix.target }} --features "wasm, parallel"
102+ args : -p folding-schemes --target ${{ matrix.target }} --features circom-frontend
103103 - name : Run wasm-compat script
104104 run : |
105105 chmod +x .github/scripts/wasm-target-test-build.sh
@@ -156,13 +156,13 @@ jobs:
156156 runs-on : ubuntu-latest
157157 strategy :
158158 matrix :
159- feature_set : [basic, wasm ]
159+ feature_set : [basic, circom-browser ]
160160 include :
161161 - feature_set : basic
162162 features : --features default,light-test
163- # We only want to test `folding-schemes` package with `wasm ` feature.
164- - feature_set : wasm
165- features : -p folding-schemes --features wasm, parallel --target wasm32-unknown-unknown
163+ # We only want to test `folding-schemes` package with `circom-browser ` feature.
164+ - feature_set : circom-browser
165+ features : -p folding-schemes --features circom-browser, parallel --target wasm32-unknown-unknown
166166 steps :
167167 - uses : actions/checkout@v2
168168 - uses : actions-rs/toolchain@v1
Original file line number Diff line number Diff line change @@ -81,8 +81,7 @@ getrandom = { version = "0.2", features = ["js"] }
8181[features ]
8282default = [" ark-circom/default" , " parallel" ]
8383parallel = []
84- wasm = [" ark-circom/wasm" ]
85- browser = [" wasm" , " byteorder" ]
84+ circom-browser = [" ark-circom/wasm" , " byteorder" ]
8685light-test = []
8786
8887
Original file line number Diff line number Diff line change @@ -411,7 +411,7 @@ where
411411 // get z_{i+1} from the F circuit
412412 let i_usize = self . i_usize . unwrap_or ( 0 ) ;
413413
414- // If we are in the browser-frontend case. The witness is already loaded within
414+ // If we are in the circom- browser-frontend case. The witness is already loaded within
415415 // self.F.witness. This was done at `self.prove_step()` fn.
416416 let z_i1 = self
417417 . F
Original file line number Diff line number Diff line change @@ -642,12 +642,12 @@ where
642642 fn prove_step (
643643 & mut self ,
644644 mut rng : impl RngCore ,
645- // This contains the full witness when we're in the browser-frontend case
645+ // This contains the full witness when we're in the circom- browser-frontend case
646646 external_inputs : Vec < C1 :: ScalarField > ,
647647 // Nova does not support multi-instances folding
648648 _other_instances : Option < Self :: MultiCommittedInstanceWithWitness > ,
649649 ) -> Result < ( ) , Error > {
650- #[ cfg( feature = "browser" ) ]
650+ #[ cfg( feature = "circom- browser" ) ]
651651 {
652652 // Slice and separate between external inputs and frontend witness.
653653 let ( frontend_witness, external_inputs) =
@@ -664,7 +664,7 @@ where
664664 ( None , external_inputs)
665665 } ;
666666
667- // If we are in the browser-case (frontend_witness = Some(witness)) then we load the witness into the FCircuit.
667+ // If we are in the circom- browser-case (frontend_witness = Some(witness)) then we load the witness into the FCircuit.
668668 if let Some ( witness) = frontend_witness {
669669 self . F . load_witness ( witness)
670670 } ;
Original file line number Diff line number Diff line change @@ -13,11 +13,11 @@ use num_bigint::BigInt;
1313use std:: rc:: Rc ;
1414use std:: { fmt, usize} ;
1515
16- #[ cfg( feature = "browser" ) ]
16+ #[ cfg( feature = "circom- browser" ) ]
1717pub mod browser;
1818pub mod utils;
1919
20- #[ cfg( feature = "browser" ) ]
20+ #[ cfg( feature = "circom- browser" ) ]
2121pub use browser:: { load_witness_from_bin_reader, CircomFCircuitBrowser } ;
2222use utils:: CircomWrapper ;
2323
@@ -38,7 +38,7 @@ impl<F: PrimeField> fmt::Debug for CustomStepNative<F> {
3838 }
3939}
4040
41- /// This circuit is the one we will use in order to fold circom circuits
41+ /// This circuit is the one we will use in order to fold Circom circuits
4242/// from a non-browser environment.
4343#[ derive( Clone , Debug ) ]
4444pub struct CircomFCircuit < F : PrimeField > {
Original file line number Diff line number Diff line change @@ -50,10 +50,10 @@ pub trait FCircuit<F: PrimeField>: Clone + Debug {
5050 ) -> Result < Vec < FpVar < F > > , SynthesisError > ;
5151
5252 /// Allows to load pre-generated witness into the FCircuit implementor.
53- /// This is only needed by the browser use cases where we have already computed our
53+ /// This is only needed by the circom- browser use cases where we have already computed our
5454 /// witness there. And we need a way to load it into the FCircuit since it's already computed.
5555 ///
56- /// By default this method will simply do nothing. Only in the browser FCircuit implementors this will have usage.
56+ /// By default this method will simply do nothing. Only in the circom- browser FCircuit implementors this will have usage.
5757 fn load_witness ( & mut self , _witness : Vec < F > ) { }
5858}
5959
You can’t perform that action at this time.
0 commit comments