Skip to main content
Version: 4.0.2

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!

If you'd like to try Leo without installing it locally on your machine, check out the Leo Playground.

<Tabs defaultValue="cargo" values={[ { label: 'Cargo', value: 'cargo' }, { 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/.

MacOS (Apple Silicon):

  1. Download Leo for Apple Silicon (MacOS)

  2. Extract the .zip file

  3. Open a terminal and navigate to the extracted directory.

  4. Run chmod +x leo leo-fmt to make the files executable

  5. Move both binaries to /usr/local/bin to use them system wide.

    mv leo leo-fmt /usr/local/bin
  6. Run leo --version to confirm installation

note

Release archives now include plugin binaries (such as leo-fmt) alongside leo. Distribution details are subject to change - see Leo #29355.

Other Platforms:

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 .
# 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