Installation
import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem';
There are a number of ways to install Leo, depending on your platform and preferences. Take your pick!
<Tabs defaultValue="cargo"
values={[
{ label: 'Cargo', value: 'cargo' },
{ label: 'cargo binstall', value: 'binstall' },
{ label: 'Pre-Built Binaries', value: 'prebuilt' },
{ label: 'Build from Source', value: 'source' },
]}>
Install Cargo
The easiest way to install Cargo is to install the latest stable release of Rust.
Install Leo
cargo install leo-lang leo-fmt
This will install the leo and leo-fmt executables at ~/.cargo/bin/.
Install cargo-binstall
cargo-binstall downloads pre-compiled binaries instead of building from source, cutting install time from minutes to seconds.
cargo install cargo-binstall
Install Leo via binstall
cargo binstall leo-lang leo-fmt
To install a specific version:
cargo binstall [email protected] [email protected]
cargo binstall metadata is only present for versions after 4.0.2. For earlier versions, use cargo install instead.
If no pre-built binary is available for your platform, cargo binstall falls back to building from source automatically.
Download Pre-Built Binaries
Pre-built binaries are available for every release from GitHub Releases.
Each release publishes a ZIP archive per platform:
| Platform | Target |
|---|---|
| Linux (x86_64, glibc) | x86_64-unknown-linux-gnu |
| Linux (x86_64, musl) | x86_64-unknown-linux-musl |
| macOS (Intel) | x86_64-apple-darwin |
| macOS (Apple Silicon) | aarch64-apple-darwin |
| Windows (x86_64) | x86_64-pc-windows-msvc |
Archives are named leo-lang-v{version}-{target}.zip (e.g. leo-lang-v4.0.1-aarch64-apple-darwin.zip).
Install
-
Download the ZIP for your platform from the latest release.
-
Extract the archive.
-
On macOS/Linux, make the binaries executable and move them onto your PATH:
chmod +x leo leo-fmt
mv leo leo-fmt /usr/local/bin/ -
Verify the installation:
leo --version
Plugin binaries such as leo-fmt are released separately under their own crate tags (e.g. leo-fmt-v1.0.0). Download the matching plugin archives from the same releases page.
Install Rust
Install the latest stable release of Rust. You can verify the installation by running:
cargo --version
Install Git
Install the latest version of Git. You can verify the installation by running:
git --version
Build Leo from Source Code
# Download the source code
git clone https://github.com/ProvableHQ/leo
cd leo
# Build and install Leo
cargo install --path crates/leo
# Build and install the formatter plugin
cargo install --path crates/fmt
This will install the leo and leo-fmt executables at ~/.cargo/bin/.
To use Leo, run
leo
For distribution maintainers and detailed artifact information, see the Binary Distribution Reference.