Specify your Main Circom File
v1.6.4
Prior to this release, Circom developers had to potentially rewrite local circuits so that their main component definition was contained in a file called circuit.circom
located in the root of their circuit upload.
We have addressed this inconvenience so you can now organize your circuit workspace in more intuitive ways.
Simply include the path to your main circom file in the circuitPath
field of your sindri.json
manifest.
If the circuitPath
field is not found, Sindri will assume you have opted to compile the old way: via a circuit.circom
file at the root of your project.
An Example
- Directory Structure
- sindri.json
Circuit Directory Structure
📦CIRCUIT-PROJECT
┣ 📂circomlib
┃ ┣ 📜aliascheck.circom
┃ ┣ 📜binsum.circom
┃ ┣ 📜bitify.circom
┃ ┣ 📜comparators.circom
┃ ┣ 📜compconstant.circom
┃ ┗ 📜gates.circom
┣ 📂my-code
┃ ┣ 📜game.circom
┃ ┗ 📜utils.circom
┗ 📜sindri.json
Let's say you have your main component defined inside of my-code/game.circom
.
Then, include that local path, my-code/game.circom
, in the circuitPath
field.
{
"$schema": "https://forge.sindri.app/api/v1/sindri-manifest-schema.json",
"name": "game",
"circuitType": "circom",
"circuitPath": "./my-code/game.circom",
"curve": "bn254",
"provingScheme": "groth16",
"witnessCompiler": "wasm"
}