glossary·2026-03-08·1 min read

Leo

Leo

Leo is Aleo's statically typed programming language for writing zero-knowledge applications. Its syntax borrows from Rust and JavaScript, hiding the complexity of arithmetic circuits so developers can write private programs without deep cryptography knowledge.

A Leo program defines data types (structs and records), functions, and optional mappings for public state. The compiler translates source code into Aleo instructions, which SnarkVM compiles into constraint systems for proof generation with Varuna. Developers write readable code; the toolchain handles circuit construction, witness generation, and proof creation.

Leo enforces constraints that reflect ZK computation realities. All loops must have compile-time-known bounds. Recursion is not supported. Data types have fixed sizes. These restrictions guarantee every program maps to a finite arithmetic circuit. Leo also has first-class support for Aleo-specific concepts: record defines private UTXO-like state, regular functions define callable entry points, and final { } blocks define on-chain logic that interacts with mappings.

Sources