Introduction to Leo
Welcome to Leo, the programming language designed for building private applications on the Aleo blockchain.What is Leo?
Leo is an imperative, statically-typed programming language that abstracts low-level cryptographic concepts and makes it easy to integrate private applications into your stack. Leo compiles to circuits, making zero-knowledge proofs practical.Leo provides a high-level language that makes zero-knowledge proofs accessible to developers without requiring deep cryptographic knowledge.
Key Features
Developer-Friendly Syntax The syntax of Leo is influenced by traditional programming languages like JavaScript, Scala, and Rust, with a strong emphasis on readability and ease-of-use. Built for Privacy Leo compiles directly to Aleo instructions, enabling you to build applications with built-in privacy guarantees on the Aleo blockchain. Comprehensive Testing Tools Leo offers developers tools to sanity check circuits including:- Unit tests
- Integration tests
- Console functions for debugging
The Aleo Ecosystem
Leo is one part of a greater ecosystem for building private applications on Aleo. The language works seamlessly with:- Aleo blockchain - The underlying Layer 1 blockchain that executes Leo programs
- snarkVM - The virtual machine that runs Aleo instructions
- snarkOS - The decentralized operating system for the Aleo network
Example Leo Program
Here’s a simple Leo program that adds two numbers:Leo is currently in active development and the language is subject to updates and improvements. Check the GitHub repository for the latest changes.
Use Cases
Leo is ideal for building:- Private DeFi applications - Create tokens, DEXs, and financial instruments with privacy guarantees
- Private voting systems - Build governance mechanisms where votes remain confidential
- Confidential gaming - Develop games with hidden state and fair outcomes
- Private identity solutions - Create identity systems that preserve user privacy
Version Information
The current version of Leo is 3.4.0. Leo requires Rust 1.93.1 or later.Next Steps
Install Leo
Get Leo installed on your system
Quick Start
Build your first Leo program