# Circom circuits: compile · Build with zero-knowledge proofs on Chromia · Learn Chromia

> Start with the Circom circuits. You must compile them before you can produce the proving and verification keys.

Source: https://chromia.com/learn/zero-knowledge-proof/circom-circuits/circom-circuits-compile/

Build with zero-knowledge proofs on ChromiaLesson 8 of 19

1. [01Introduction to the course](https://chromia.com/learn/zero-knowledge-proof/introduction/)
2. [02Zero-knowledge proof](https://chromia.com/learn/zero-knowledge-proof/zero-knowledge-proof/)
3. [03Project setup](https://chromia.com/learn/zero-knowledge-proof/setup/)
4. [04Architecture overview](https://chromia.com/learn/zero-knowledge-proof/architecture-overview/)

Module 1: Writing Circom circuits

1. [05Overview](https://chromia.com/learn/zero-knowledge-proof/circom-circuits/)
2. [06Circom circuits: introduction](https://chromia.com/learn/zero-knowledge-proof/circom-circuits/circom-circuits-introduction/)
3. [07Circom files overview](https://chromia.com/learn/zero-knowledge-proof/circom-circuits/circom-circuits-project/)
4. [08Circom circuits: compile](https://chromia.com/learn/zero-knowledge-proof/circom-circuits/circom-circuits-compile/)

Module 2 – Dapp

1. [09Overview](https://chromia.com/learn/zero-knowledge-proof/dapp/)
2. [10Dapp: setup and run](https://chromia.com/learn/zero-knowledge-proof/dapp/dapp-setup-run/)
3. [11Dapp overview](https://chromia.com/learn/zero-knowledge-proof/dapp/dapp-overview/)
4. [12Dapp entities](https://chromia.com/learn/zero-knowledge-proof/dapp/dapp-entities/)
5. [13PLONK verification](https://chromia.com/learn/zero-knowledge-proof/dapp/dapp-verification/)
6. [14Dapp operations overview](https://chromia.com/learn/zero-knowledge-proof/dapp/dapp-operations/)
7. [15Dapp queries overview](https://chromia.com/learn/zero-knowledge-proof/dapp/dapp-queries/)

Module 3 – Frontend

1. [16Overview](https://chromia.com/learn/zero-knowledge-proof/frontend/)
2. [17Frontend: setup and run](https://chromia.com/learn/zero-knowledge-proof/frontend/frontend-setup-run/)
3. [18Frontend architecture](https://chromia.com/learn/zero-knowledge-proof/frontend/frontend-explore/)
4. [19Frontend: test](https://chromia.com/learn/zero-knowledge-proof/frontend/frontend-test/)

[Learn](https://chromia.com/learn/)[Build with zero-knowledge proofs on Chromia](https://chromia.com/learn/zero-knowledge-proof/)

08 / 19Module 1: Writing Circom circuitsAdvanced

# Circom circuits: compile

## Setup Circom circuits

Start with the Circom circuits. You must compile them before you can produce the proving and verification keys.

bash

```nolines
cd circom_circuit
```

Next, install the dependencies:

bash

```nolines
npm install
```

## Compile Circom circuits

This step compiles every circuit and produces its proving and verification keys.

bash

```nolines
chmod +x compile_complete.sh
```

Run the compilation:

bash

```nolines
./compile_complete.sh
```

When it finishes, you should see these files:

* `shield_operation.zkey` & `shield_operation_verification_key.json`
* `unshield_operation.zkey` & `unshield_operation_verification_key.json`
* `private_transfer.zkey` & `verification_key.json`

Compilation covers three tasks:

* Translating each readable `.circom` source file into a constraint system (`.r1cs`).
* Running a trusted setup that outputs a **proving key** (`.zkey`) and a **verification key** (`verification_key.json`). The client relies on the proving key to create proofs, while the blockchain relies on the verification key to check them.
* Building WebAssembly (`.wasm`) versions of the circuits so they run efficiently in the browser.

Written for this site from Chromia’s public course. Code samples are the course’s own.

[← Previous**Circom files overview**](https://chromia.com/learn/zero-knowledge-proof/circom-circuits/circom-circuits-project/)[Next →**Module 2 – Dapp**](https://chromia.com/learn/zero-knowledge-proof/dapp/)

On this page

* [Setup Circom circuits](#setup-circom-circuits)
* [Compile Circom circuits](#compile-circom-circuits)
