Leo is an imperative language that compiles private application logic into zero-knowledge circuits for Aleo. Developers write readable code while the toolchain handles lower-level cryptography.
Overview
Leo is a statically typed programming language aimed at formally verified, zero-knowledge applications on the Aleo ecosystem. It abstracts circuit-oriented concepts so teams can add private logic to their stacks without hand-writing every cryptographic detail.
Programs compile to circuits suitable for zero-knowledge proofs. Syntax takes cues from JavaScript, Scala, and Rust with an emphasis on readability. The toolchain includes unit tests, integration tests, and console helpers to sanity-check circuits before deployment.
Developers install the Leo CLI through Cargo or build from source after setting up Rust on Linux, macOS, or Windows. Commands such as leo new scaffold projects and leo run compiles programs into Aleo instructions and executes them locally. A web-based Leo Playground offers in-browser experimentation with sample applications.
Editor integrations cover Visual Studio Code, Sublime Text, and IntelliJ. Documentation and workshop material walk through Aleo application structure. The language remains under active development and may introduce breaking changes while in alpha.
Key features
- High-level zero-knowledge circuit compilation
- Imperative statically typed syntax
- Leo CLI project scaffolding
- Unit and integration test tooling
- Browser Leo Playground
- IDE plugins for major editors
- Aleo instruction compilation via leo run
- Cargo-based compiler distribution
Use cases
- Private smart-contract style logic on Aleo
- Prototyping zk apps in the playground
- Teaching zero-knowledge application design
- Circuit testing before mainnet deployment
- Aleo ecosystem application development