ZkC follows a relatively standard compiler organisation with a front-end layer, an intermediate representation layer and, finally, a backend layer:
-
Front End — parses ZkC source files, links cross-file references, type-checks, validates control flow, and emits a fully resolved Abstract Syntax Tree (AST).
-
Intermediate Representation — lowers the AST into a simple register-machine IR, vectorizes the flat instruction stream into VLIW-style bundles, and optionally splits wide registers to fit within the target field's bandwidth.
-
Arithmetization Layer — compiles the vectorized IR into vanishing constraints, range constraints, and lookup arguments that form the final arithmetized circuit.