Skip to content

Commit

Permalink
fix: use fixed rust (#207)
Browse files Browse the repository at this point in the history
* fix: use fixed rust
  • Loading branch information
eigmax authored Feb 7, 2024
1 parent 5342c84 commit b01c8a2
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions dsl_compile/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ pub fn circom_compiler(
wasm_flag: user_input.wasm_flag(),
wat_flag: user_input.wat_flag(),
js_folder: user_input.js_folder().to_string(),
wasm_name: user_input.wasm_name().to_string(),
wasm_name: user_input.wasm_name(),
c_folder: user_input.c_folder().to_string(),
c_run_name: user_input.c_run_name().to_string(),
c_run_name: user_input.c_run_name(),
c_file: user_input.c_file().to_string(),
dat_file: user_input.dat_file().to_string(),
wat_file: user_input.wat_file().to_string(),
Expand Down
4 changes: 2 additions & 2 deletions groth16/src/groth16.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ mod tests {
aux_offset: 0,
};
let inputs = circuit1.get_public_inputs().unwrap();
let proof = Groth16::prove(&params.0, circuit1.clone(), &mut rng)?;
let proof = Groth16::prove(&params.0, circuit1, &mut rng)?;
let elapsed1 = t1.elapsed().as_secs_f64();
println!("2-groth16-bn128 prove run time: {} secs", elapsed1);

Expand Down Expand Up @@ -160,7 +160,7 @@ mod tests {
aux_offset: 0,
};
let inputs = circuit1.get_public_inputs().unwrap();
let proof = Groth16::prove(&params.0, circuit1.clone(), &mut rng)?;
let proof = Groth16::prove(&params.0, circuit1, &mut rng)?;
let elapsed1 = t1.elapsed().as_secs_f64();
println!("2-groth16-bls12381 prove run time: {} secs", elapsed1);

Expand Down
2 changes: 1 addition & 1 deletion recursion/src/pilcom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ mod test {
.canonicalize()
.unwrap();

let pil_str = fs::read_to_string(path.clone()).unwrap();
let pil_str = fs::read_to_string(path).unwrap();
// The target and actual pil_json
let actual = compile_pil_from_str(&pil_str);
let _target = load_json::<PIL>("data/fib.pil.json").unwrap();
Expand Down
2 changes: 2 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[toolchain]
channel = "nightly-2023-06-02"
3 changes: 1 addition & 2 deletions starky/src/interpreter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,8 @@ pub struct Block<T: FieldExtension> {
impl<T: FieldExtension> Block<T> {
fn codegen(&self, step: &str, codebuf: String) {
use std::io::Write;
let body = codebuf.to_string();
let mut f = std::fs::File::create(format!("/tmp/{}_{}.rs", self.namespace, step)).unwrap();
write!(f, "{}", &body).unwrap();
write!(f, "{}", &codebuf).unwrap();
}

/// parameters: ctx, i
Expand Down
2 changes: 1 addition & 1 deletion starky/src/starkinfo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ impl StarkInfo {
stark_struct: &StarkStruct,
global_l1: Option<String>,
) -> Result<(StarkInfo, Program)> {
let pil_deg = pil.references.values().nth(0).unwrap().polDeg;
let pil_deg = pil.references.values().next().unwrap().polDeg;

let stark_deg = 2usize.pow(stark_struct.nBits as u32);

Expand Down

0 comments on commit b01c8a2

Please sign in to comment.