Skip to main content

The Leo Programming Language

Write formally verified, zero-knowledge applications with a statically-typed language that compiles to Aleo bytecode. Build privacy-preserving dApps with the power of zk-SNARKs.

Quick start

Get up and running with Leo in minutes

1

Install Leo

Install Leo using cargo or download the prebuilt binary:
cargo install leo-lang
Verify the installation:
leo --version
2

Create a new project

Use the Leo CLI to scaffold a new project:
leo new helloworld
cd helloworld
This creates a new Leo project with a basic program structure and configuration.
3

Build and run your program

Compile and execute your Leo program locally:
leo run main 1u32 2u32
Leo will compile your program to Aleo bytecode and execute it with the provided inputs. You’ll see the execution results in your terminal.
4

Deploy to the network

When you’re ready, deploy your program to the Aleo network:
leo deploy
Your program will be deployed to the blockchain, making it available for on-chain execution.

Explore by topic

Deep dive into Leo’s features and capabilities

Leo Language

Learn about Leo’s syntax, types, operators, and control flow

CLI Commands

Master the Leo CLI for building, testing, and deploying programs

Records & Storage

Understand records, mappings, and on-chain storage patterns

Testing

Write unit and integration tests for your Leo programs

Compiler Architecture

Explore how Leo compiles to Aleo bytecode and ZK circuits

Examples

Learn from real-world Leo program examples

Key features

Formally verified programs

Leo compiles to zero-knowledge circuits, ensuring your programs are cryptographically sound and verifiable.

Privacy by default

Build applications with private state and selective disclosure using records and finalize blocks.

Familiar syntax

Leo’s syntax draws from Rust, JavaScript, and Scala, making it accessible for developers from various backgrounds.

Complete toolchain

From project scaffolding to deployment, Leo provides all the tools you need for the full development lifecycle.

Resources

Join the community

Get help, share your projects, and connect with other Leo developers

Contribute to Leo

Learn how to contribute to the Leo language and compiler

Troubleshooting

Find solutions to common issues and error messages

ABNF Grammar

View the formal grammar specification for the Leo language

Ready to build on Aleo?

Start building privacy-preserving applications with Leo today. Follow our quickstart guide to create your first zero-knowledge program.

Get Started