Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
Stateless compiler (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
leolara authored Aug 10, 2023
1 parent 300229a commit 1c23b4d
Show file tree
Hide file tree
Showing 5 changed files with 758 additions and 787 deletions.
12 changes: 7 additions & 5 deletions examples/fibonacci.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ use chiquito::{
* circuit */
compiler::{
cell_manager::SingleRowCellManager, // input for constructing the compiler
step_selector::SimpleStepSelectorBuilder, // input for constructing the compiler
Compiler,
compile, // input for constructing the compiler
config,
step_selector::SimpleStepSelectorBuilder,
},
dsl::{
cb::*, // functions for constraint building
Expand Down Expand Up @@ -100,9 +101,10 @@ fn fibo_circuit<F: Field + From<u64> + Hash>() -> (Circuit<F>, Option<Assignment
})
});

let compiler = Compiler::new(SingleRowCellManager {}, SimpleStepSelectorBuilder {});

compiler.compile(&fibo)
compile(
config(SingleRowCellManager {}, SimpleStepSelectorBuilder {}),
&fibo,
)
}

// After compiling Chiquito AST to an IR, it is further parsed by a Chiquito Halo2 backend and
Expand Down
Loading

0 comments on commit 1c23b4d

Please sign in to comment.