This library enables the creation of arithmetic circuits from circom programs.
Category | Type | Supported |
---|---|---|
Statements | InitializationBlock |
✅ |
Block |
✅ | |
Substitution |
✅ | |
Declaration |
✅ | |
IfThenElse |
✅ | |
While |
✅ | |
Return |
✅ | |
MultSubstitution |
❌ | |
UnderscoreSubstitution |
❌ | |
ConstraintEquality |
❌ | |
LogCall |
❌ | |
Assert |
✅ | |
Expressions | Call |
✅ |
InfixOp |
✅ | |
Number |
✅ | |
Variable |
✅ | |
PrefixOp |
✅ | |
InlineSwitchOp |
❌ | |
ParallelOp |
❌ | |
AnonymousComp |
✅ | |
ArrayInLine |
❌ | |
Tuple |
✅ | |
UniformArray |
❌ |
WIP
- Rust: To install, follow the instructions found here.
-
Write your circom program in the
input
directory under thecircuit.circom
name. -
Build the program
cargo build --release
- Run the compilation
cargo run --release
The compiled circuit and circuit report can be found in the ./output
directory.
Although this library is named after arithmetic circuits, the CLI integrates boolify allowing further compilation down to boolean circuits.
To achieve this, add --boolify-width DESIRED_INT_WIDTH
to your command:
cargo run --release -- --boolify-width 16
Contributions are welcome!
This project is licensed under the MIT License - see the LICENSE file for details.