Setup
There are a number of ways to install Leo, depending on your platform and preferences. Take your pick!
If you'd like to try Leo without installing it locally on your machine, check out the Leo Playground.
- Cargo
- Pre-Built Binaries
- Build from Source
1. Install Cargo
The easiest way to install Cargo is to install the latest stable release of Rust: bit.ly/start-rust
2. Install Leo
cargo install leo-lang
This will generate the executable at ~/.cargo/bin/leo
.
Download and install Leo with the official pre-built binaries.
For MacOS (Apple Silicon)
- Download Leo for Apple Silicon (MacOS)
- This will download a
.zip
file containing a Unix Executable File.
Installation:
- Extract the
.zip
file. - Open a terminal and navigate to the extracted directory.
- Run
chmod +x leo
to make the file executable. - Move
leo
to/usr/local/bin
to use it system-wide. - Run
leo --version
to confirm installation.
mv leo /usr/local/bin
For Other Platforms
Install from Source
To use the latest Leo features, install the Leo source code from GitHub.
1. Install the Prerequisites
- Install Git: bit.ly/start-git
- Install Rust: bit.ly/start-rust
Verify Installation
git --version
cargo --version
2. Build Leo from Source Code
# Download the source code git clone https://github.com/ProvableHQ/leo cd leo # Build and install cargo install --path .
This will generate the executable at ~/.cargo/bin/leo
.
To use Leo, run:
leo