What it is
A single-file Cairo analyzer built on the shared ZK analyze layout. It renders a Monaco-based editor, runs compile-and-analyze, lists findings, and links to the full ZK Studio. The Supported Checks panel lists the detectors that run against Cairo input.
Why it exists
Cairo / StarkNet code has arithmetic-specific failure modes — felt overflow and missing assertions — that are independent of on-chain semantics. This page surfaces those checks as a fast, single-file workflow.
Who uses it
- Cairo author — checks a program before deploying to StarkNet.
- Auditor — reviews a Cairo file from an audit engagement.
How to open it
- Sidebar → Library → Cairo (StarkNet).
/library→ Cairo (StarkNet) card.- Direct URL —
/cairo-analyze.
Using the page
-
Editor — paste or type Cairo source.
-
Analyze — findings populate below.
-
Launch ZK Studio — opens
/zk-studio?lang=cairo. -
Supported Checks — lists the two detectors that run against the file:
Severity Detector High Felt Overflow Medium Missing Assertions
Inputs and outputs
| Input | Source | Required |
|---|---|---|
| Cairo source | Editor | yes |
| Output | Format | Destination |
|---|---|---|
| Findings | In-page list | Editor section |
Controls reference
- Editor — Monaco editor with Cairo syntax highlighting.
- Launch ZK Studio — opens the full studio at
/zk-studio?lang=cairo.
Limits
- Requires a signed-in account.
- Single-file only. Multi-file projects need ZK Studio.
Troubleshooting
| Symptom or error | Cause | Action |
|---|---|---|
| “Compile error” | Cairo source fails to compile | Fix syntax and retry. |
| No findings on a known issue | Issue is outside the two supported checks | Open the file in ZK Studio. |
Related pages
- ZK Studio — full IDE for Noir, Circom, Leo, and Cairo.
- Leo (Aleo) Program Analysis — Aleo equivalent.
- Noir Circuit Analysis — primary ZK entry point.