Introducing Achronyme — a language for zero-knowledge proofs. Read the announcement arrow_right_alt

Crate Map

Workspace crate dependencies and responsibilities.

The Achronyme workspace contains 19 crates. All share the same version and Rust edition. They are organised into four tiers: leaves with no workspace dependencies, vocabulary crates, IR/compiler stack, and top-level orchestration.

Crate overview

CratePathPurpose
diagnosticsdiagnostics/Spans, errors, suggestions, rustc-style renderer (zero-dep leaf)
memorymemory/FieldElement<F> (BN254/BLS12-381/Goldilocks), FieldBackend trait, heap arenas, GC
ach-macrosach-macros/Proc macros: #[ach_native], #[ach_module]
achronyme-parserachronyme-parser/Lexer, Pratt+recursive-descent parser, owned AST types
resolveresolve/Symbol table, builtin registry, unified dispatch resolver (Movimiento 2)
lysis-typeslysis-types/InstructionKind<F>, NodeId shared with the Lysis VM
constraintsconstraints/Variable, LinearCombination, R1CS + Plonkish system, Poseidon, binary export
ir-coreir-core/SSA leaf: Instruction<F>, SsaVar, Visibility, IrType
ir-forgeir-forge/ProveIR templates, AST→ProveIR compiler, Lysis lift walker (lifts ProveIR to BOC bytecode for the Lysis VM)
irir/IR passes (DCE, CSE, const-fold, taint), module loader, inspector, ProveIR orchestration
zkczkc/Constraint compiler: R1CS backend, Plonkish backend, witness ops, oracle scaffold
akroncakronc/Bytecode compiler for the Akron VM (was compiler)
akronakron/Register-based general-purpose bytecode VM (was vm)
artikartik/Witness-computation SSA VM (was witness) — see Artik
lysislysis/Third VM, BOC executor: runs lifted bytecode and emits SSA IR via the interning sink — in progress
circomcircom/Circom 2.x frontend: lexer, parser, analysis, lowering — see Circom Frontend
provingproving/Groth16 (arkworks), PlonK (halo2-KZG), Solidity verifier generation
achronyme-stdstd/Standard library via NativeModule trait
clicli/Command-line interface, proof orchestration

Crate renames (post-cleanup)

A structural cleanup renamed three crates and split ir into three:

Old nameNew nameReason
vmakronDistinguish from the witness VM and the in-progress Lysis VM
witnessartikMatch the bytecode magic ARTK and the file extension .artik
compilerakroncDisambiguate from the constraint compiler zkc; “akron compiler”
irir-core + ir + ir-forgeBreak dependency cycles; expose SSA primitives as a leaf crate

The old names appear in git history pre-2026-04-18 and in some legacy file-path comments — they all map mechanically to the new names.

Dependency tiers

Tier 0 — Foundation (zero workspace deps)

diagnostics, memory, ach-macros, lysis-types. Pure leaves. Together they define the universal vocabulary of the workspace: spans, errors, field elements, opcode token shapes, and proc macros.

Tier 1 — Vocabulary

achronyme-parser (depends on diagnostics) — surface AST.

resolve (depends on achronyme-parser, diagnostics) — symbol table, builtin registry, ModuleGraph. Hosts SymbolId, CallableKind, Availability. After Movimiento 2, all dispatch (method call, Type::MEMBER, native call) goes through resolve rather than ad-hoc table lookups.

constraints (depends on memory) — LinearCombination, ConstraintSystem, PlonkishSystem, Poseidon parameters, .r1cs/.wtns binary writers in iden3 format.

ir-core (depends on memory, diagnostics) — SSA Instruction<F>, SsaVar, Visibility, IrType. Leaf crate so ir and ir-forge can both depend on it without forming a cycle.

Tier 2 — IR and circuit compilation

ir-forge (depends on ir-core, achronyme-parser, resolve, diagnostics, lysis-types, circom for lowering hooks)

ProveIR data types (ProveIR, CircuitExpr, CircuitNode, CaptureDef), AST→ProveIR compiler (ProveIrCompiler), Lysis lift walker (the AST→Bytecode half of the BOC pipeline). The single layer where compile-time symbolic circuit reasoning happens. See ProveIR.

ir (depends on ir-core, ir-forge, resolve)

IR orchestration: passes (const_fold, cse, dce, bool_prop, taint, bound_inference), evaluator, module loader, inspector graph builder. Hosts the CircomLibraryHandle trait.

zkc (depends on ir-core, constraints, memory)

The constraint compiler. R1CS backend (compile_to_r1cs), Plonkish backend, witness operations (WitnessOp), Lysis-vs-circom oracle scaffolding for cross-mode equivalence checks.

circom (depends on achronyme-parser, diagnostics, ir-forge, resolve)

Full Circom 2.x frontend. Lifts non-inlinable function bodies to Artik via lowering::artik_lift.

Tier 3 — Bytecode + VMs

akronc (depends on achronyme-parser, resolve, diagnostics)

Bytecode compiler for the Akron VM. Owns the bytecode optimizer (peephole, const-fold, dead-store elim).

akron (depends on memory, constraints, ir, ir-forge)

Register-based general-purpose VM. 42 opcodes, mark-sweep tri-color GC, 64-bit tagged values. Loads .achb files via akron::loader. Hosts prove {} execution at runtime via the ProveHandler trait.

artik (depends on memory)

Dedicated witness-computation VM. ~25 opcodes, SSA-style registers, no heap, no GC. Loads .artik blobs embedded in WitnessOp::ArtikCall.

lysis (depends on memory, artik, lysis-types)

Third VM — in progress. BOC executor: structural template instantiator with hash-consing interner that runs lifted bytecode and emits SSA IR via the interning sink. See Lysis VM. Walker lives in ir-forge::lysis_lift; oracle scaffold in zkc::lysis_oracle.

Tier 4 — Top-level orchestration

proving (depends on constraints, memory)

In-process Groth16 (ark-groth16 + ark-bn254) and PlonK (halo2 KZG, PSE fork). Generates Solidity verifiers for on-chain Groth16 verification.

achronyme-std (depends on akron, memory, ach-macros)

Standard library natives via the NativeModule trait. 16 natives, registered through #[ach_native] proc macros.

cli (depends on akron, akronc, ir, ir-forge, zkc, circom, proving, resolve, achronyme-std)

User-facing binary. Dispatches ach run, ach circuit, ach circom, ach prove, ach inspect, ach init. Owns the DefaultCircomWitnessHandler and the ProveHandler implementations injected into Akron.

Dependency graph

Flowchart diagram19 nodes, 24 edgesdiagnosticsTier 0 leaflysis-typesTier 0 leafach-macrosTier 0 leafmemoryachronyme-parserconstraintsresolveir-coreir-forgeirzkccircomakroncakronartiklysiscliuses everythingprovingachronyme-std

Key entry points

TaskCrateFunction
Parse .ach sourceachronyme-parserparse_program(source)
Parse .circom sourcecircomcircom::parser::parse_circom(source)
Compile bytecodeakroncCompiler::compile(&program)
Compile prove blockir-forgeProveIrCompiler::compile_prove_block(...)
Compile circom templatecircomcompile_to_prove_ir(source)
Instantiate ProveIRirProveIR::instantiate(captures, ...)
Lower AST to IR (circuit)irIrLowering::lower_circuit(source, pub, wit)
Optimize IRirpasses::optimize(&mut program)
Compile to R1CSzkccompile_to_r1cs(program)
Compile to PlonkishzkcPlonkishCompiler::compile_ir(program)
Generate witnesszkccompile_to_r1cs_with_witness(program, inputs)
Run Akron VMakronVm::run(function)
Run Artikartikartik::execute_with_budget(program, ctx, budget)
Run Lysis (in-progress)lysislysis::execute(program, sink)
Lift Circom function to Artikcircomlowering::artik_lift::lift(...)
Lift ProveIR to Lysisir-forgelysis_lift::Walker::lift(...)
Generate Groth16 proofprovingproving::groth16::prove(cs, witness, pk)
Generate PlonK proofprovingproving::halo2_proof::prove(cs, witness, pk)
Solidity verifierprovingproving::solidity::generate(...)
Run CLIclimain() → command dispatch

Cross-references

Navigation