Installation
This guide will help you install Leo on your system. Leo is distributed through Cargo (Rust’s package manager) and can also be built from source.System Requirements
Leo requires Rust 1.93.1 or later. Make sure you have Rust installed before proceeding.
Supported Platforms
- macOS (Intel and Apple Silicon)
- Linux (x86_64)
- Windows (64-bit and 32-bit)
Install Rust
If you don’t have Rust installed, you’ll need to install it first using rustup.Install Rust on macOS or Linux
Run the following command in your terminal:This will download and install
rustup, which manages Rust versions.Install Rust on Windows
Download and run the appropriate installer:
- Windows 64-bit: Download installer
- Windows 32-bit: Download installer
Install Leo
There are two ways to install Leo: using Cargo or building from source.- Install with Cargo (Recommended)
- Build from Source
Install Latest Release
If you don’t intend to work on the Leo compiler itself, you can install the latest Leo release with:leo binary in your system.The installation may take several minutes as Cargo compiles Leo and its dependencies.
Verify Installation
Once installed, verify that Leo is working correctly:Check Leo is in your PATH
Run the following command:You should see the Leo help message with available commands.
Update Leo
You can update Leo to the latest released version using the following command:Command Line Options
Leo provides several global flags that can be used with any command:Global Options
-d, --debug- Print additional information for debugging-q, --quiet- Suppress CLI output--json-output[=<PATH>]- Write results as JSON to a file--disable-update-check- Disable Leo’s daily check for version updates--path <PATH>- Path to Leo program root folder--home <PATH>- Path to Aleo program registry
Troubleshooting
Leo command not found
If you get a “command not found” error, make sure Cargo’s bin directory is in your PATH:~/.bashrc, ~/.zshrc, or equivalent shell configuration file.
Installation fails during compilation
If installation fails with compilation errors:-
Make sure you have Rust 1.93.1 or later:
-
Try cleaning the cargo cache:
- Attempt the installation again
Permission denied errors
On Unix-like systems, you may need to make sure you have write permissions to Cargo’s installation directory, or use:Next Steps
Quick Start Tutorial
Create your first Leo program and learn the basics