# CMake

## general options

| Flag                   | descr                                                                                                       | default |
| ---------------------- | ----------------------------------------------------------------------------------------------------------- | ------- |
| **CMAKE\_BUILD\_TYPE** | Build type (Debug, Release, RelWithDebInfo, MinSizeRel)                                                     | Release |
| **INCLUDE**            | Path to additional CMakeLists.txt Dir, which will included into the build, allowing to extend the binaries. |         |

## eth options

| Flag                       | descr                                                                                                                                                                                                                  | default |
| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| **ETH\_ACCOUNT**           | support eth account verification. eth\_getBalance, eth\_getStorageAt, eth\_getProof, eth\_getCode, eth\_getTransactionCount                                                                                            | ON      |
| **ETH\_BLOCK**             | support eth block verification. eth\_getBlockByHash, eth\_getBlockByNumber, eth\_getBlockTransactionCountByHash, eth\_getBlockTransactionCountByNumber, eth\_getUncleCountByBlockHash, eth\_getUncleCountByBlockNumber | ON      |
| **ETH\_CALL**              | support eth call verification. eth\_call, eth\_estimateGas                                                                                                                                                             | ON      |
| **ETH\_LOGS**              | support eth logs verification. eth\_getLogs                                                                                                                                                                            | ON      |
| **ETH\_RECEIPT**           | support eth receipt verification. eth\_getTransactionReceipt                                                                                                                                                           | ON      |
| **ETH\_TX**                | support eth Transaction verification. eth\_getTransactionByHash, eth\_getTransactionByBlockHashAndIndex, eth\_getTransactionByBlockNumberAndIndex                                                                      | ON      |
| **ETH\_UTIL**              | support eth utils like eth\_chainId or web3\_sha3                                                                                                                                                                      | ON      |
| **EVMLIGHT**               | uses evmlight vor eth\_call verification, which is smaller and faster, but does not track gas.                                                                                                                         | OFF     |
| **EVMONE**                 | uses evmone to verify eth\_calls                                                                                                                                                                                       | ON      |
| **PRECOMPILES\_BN128**     | Precompile BN128                                                                                                                                                                                                       |         |
| **PRECOMPILES\_KZG**       | Precompile KZG                                                                                                                                                                                                         |         |
| **PRECOMPILES\_RIPEMD160** | Precompile ripemd160                                                                                                                                                                                                   | ON      |
| **USE\_CHECKPOINTZ**       | enable checkpoint fetching from checkpointz                                                                                                                                                                            |         |

## precompiles options

| Flag                       | descr                                                | default |
| -------------------------- | ---------------------------------------------------- | ------- |
| **ETH\_PRECOMPILE\_EMBED** | Embed KZG trusted setup G2^tau as a generated header | ON      |

## kona\_bridge options

| Flag                    | descr                                         | default |
| ----------------------- | --------------------------------------------- | ------- |
| **BUILD\_KONA\_BRIDGE** | Build Kona-P2P bridge as static C-FFI library |         |

## .. options

| Flag                          | descr                                                                                                                                                         | default |
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| **BLOCK\_HASH\_CACHE**        | Cache block hashes for faster verification within the same block                                                                                              | ON      |
| **BLS\_DESERIALIZE**          | Store BLS keys deserialized. It is faster but uses 25k more memory in cache per period.                                                                       | ON      |
| **C4\_PYTHON**                | Build Python bindings                                                                                                                                         | OFF     |
| **CHAIN\_ETH**                | includes the ETH verification support                                                                                                                         | ON      |
| **CHAIN\_OP**                 | includes the OP-Stack verification support                                                                                                                    | OFF     |
| **CLI**                       | Build command line tools                                                                                                                                      | ON      |
| **COMBINED\_STATIC\_LIB**     | Build a combined static library                                                                                                                               | OFF     |
| **COVERAGE**                  | Enable coverage tracking                                                                                                                                      | OFF     |
| **CURL**                      | Enable CURL support                                                                                                                                           | ON      |
| **DART**                      | Build Dart bindings                                                                                                                                           | OFF     |
| **EMBEDDED**                  | Build for embedded target                                                                                                                                     | OFF     |
| **ETH\_ZKPROOF**              | includes the ETH ZK-Proof verification support                                                                                                                | ON      |
| **ETH\_ZKPROOF\_BUILD\_HOST** | Build eth-sync-script host binary                                                                                                                             |         |
| **FILE\_STORAGE**             | if activated the verfifier will use a simple file-implementaion to store states in the current folder or in a folder specified by the env var C4\_STATES\_DIR | ON      |
| **HTTP\_SERVER**              | Build the HTTP server using libuv and llhttp                                                                                                                  | OFF     |
| **HTTP\_SERVER\_GEO**         | support for geo-location                                                                                                                                      | ON      |
| **INSTALLER**                 | Build installer packages                                                                                                                                      |         |
| **KOTLIN**                    | Build Kotlin bindings                                                                                                                                         | OFF     |
| **MEMORY\_STORAGE**           | if activated the verifier will use an in-memory storage                                                                                                       |         |
| **MESSAGES**                  | if activated the binaries will contain error messages, but for embedded systems this is not needed and can be turned off to save memory                       | ON      |
| **PAP**                       | Enable Pragmatic Adaptive Privacy mode in verifier                                                                                                            | ON      |
| **PROVER**                    | Build the prover library                                                                                                                                      | ON      |
| **PROVER\_CACHE**             | Caches blockhashes and maps, which makes a lot of sense on a server                                                                                           | OFF     |
| **PROVER\_TRACE**             | Collect lightweight prover-internal spans for server export                                                                                                   | OFF     |
| **SHAREDLIB**                 | Build shared library                                                                                                                                          | OFF     |
| **STATIC\_MEMORY**            | if true, the memory will be statically allocated, which only makes sense for embedded systems                                                                 | OFF     |
| **SWIFT**                     | Build Swift bindings                                                                                                                                          | OFF     |
| **TEST**                      | Build the unit tests                                                                                                                                          | OFF     |
| **USE\_MCL**                  | Enable MCL support for ZK-Proof verification                                                                                                                  | OFF     |
| **VERIFIER**                  | Build the verifier library                                                                                                                                    | ON      |
| **WASM**                      | Build WebAssembly target                                                                                                                                      | OFF     |
| **WITNESS\_SIGNER**           | Enable witness signing                                                                                                                                        | ON      |

## util options

| Flag                         | descr                                | default |
| ---------------------------- | ------------------------------------ | ------- |
| **PRECOMPILE\_ZERO\_HASHES** | Enable precomputed zero hashes cache |         |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://corpus-core.gitbook.io/specification-colibri-stateless/developer-guide/building/cmake-colibri-lib.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
