You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Leo currently distributes prebuilt binaries via GitHub releases and supports cargo install from source.
With the plugin system landing (PR #29245), Leo will ship multiple binaries (leo + leo-fmt + future plugins) that need to be distributed as a cohesive set. The existing leo update self-update mechanism (#29282) conflicts with immutable environments and proper package managers.
This proposal outlines a phased plan to improve Leo's distribution story end-to-end.
The foundation for everything else. Introduces leo-<name> plugin dispatch and migrates leo fmt to a standalone leo-fmt binary. GH release workflow already updated to bundle both binaries per platform.
Status: PR open, ready for review.
Follow-ups (covered in later sections):
Update leo.nix to include plugins.
Update leo-docs-source with plugin guide.
2. Improve Release Automation with Per-Crate Git Tags
Decouple release cadence so tooling (formatter, LSP) can ship independently from the compiler. A single generic CI workflow detects per-crate tags (e.g. leo-fmt-1.0.1), verifies version matches Cargo.toml, publishes to crates.io, and builds cross-platform release binaries.
Key elements:
Per-crate git tags trigger per-crate releases.
Append-only releases.toml records compatibility info (snarkVM revision, etc.).
Currently leo.nix builds from source. Add leo-bin and snarkos-bin derivations that fetch upstream prebuilt binaries directly, with an interface for selecting arbitrary versions - similar to how rust-overlay provides arbitrary Rust versions.
Key elements:
leo-bin derivation fetching GH release artifacts by version.
Shorthand latest for latest tagged release.
Shorthand nightly for latest successful master build (if applicable).
Include plugin binaries (leo-fmt, etc.) alongside leo.
This gives Nix users the fastest install path and proper version switching via flake inputs.
5. Document Leo's Binary Publishing Details
Add documentation to leo-docs-source covering how Leo binaries are published, so that:
Users know what installation options exist and how to use them.
Community members can package Leo for managers we don't officially support (Gentoo ebuilds, Void Linux, FreeBSD ports, etc.) without reverse-engineering the release process.
Documentation should cover:
GH release URL pattern and artifact naming convention.
List of target triples and their corresponding artifacts.
Which binaries are included in each zip (leo, leo-fmt, future plugins).
Minimum expectations for downstream packages (all binaries should be installed together, placed on PATH).
How releases.toml can be used to determine version compatibility.
6. Add Leo to Major Package Managers
Recommended
Manager
Platforms
Binary Sets
Auto-pickup
Approachability
Homebrew tap
macOS, Linux
Good (cask bundles bins)
Excellent (GH Actions)
Easy
AUR
Arch + derivatives
Good (PKGBUILD)
Good (Renovate/Actions)
Easy
nixpkgs
NixOS, any w/ Nix
Excellent
Community bot PRs
Moderate
Homebrew tap - Create ProvableHQ/homebrew-leo with a cask downloading the GH release zip. A GH Actions workflow on the leo repo triggers a bump PR on the tap each release. Cask naturally bundles all binaries from the zip. Largest reach for macOS developers, also works on Linux via Linuxbrew.
AUR (leo-bin) - Single PKGBUILD that downloads the GH release binary zip for linux-gnu. -bin suffix convention tells users it's prebuilt. Automate updates with Renovate bot or GH Actions pushing to AUR on release. Arch/Manjaro devs expect tools to be on AUR.
nixpkgs - The leo.nix flake already covers Nix power users. Submitting to nixpkgs adds discoverability (nix search nixpkgs leo), faster installs via the nixpkgs binary cache, and reaches users who don't know about the flake. Separate effort with minor PR review overhead, best done after leo.nix stabilizes post-plugins.
Notable mentions - omitted for now
The following could be added later if demand shows:
Manager
Why omitted
APT / PPA
High maintenance - GPG key management, repo hosting, per-distro builds.
Snap
classic confinement needed for compiler file access, requires Snap Store review.
Flatpak
Designed for desktop GUI apps. Sandbox model fights compiler file access. No built-in auto-update.
Scoop (Windows)
Windows users can use WSL + any Linux method, or cargo-binstall natively.
WinGet (Windows)
Same as Scoop. Strict review process adds friction.
mise / asdf
Good version-switching UX, but cargo-binstall covers version pinning.
The binary publishing documentation (section 5) is designed to make it straightforward for community members to add Leo to their preferred package manager without our involvement. If someone wants Leo on Gentoo, Void, FreeBSD ports, Chocolatey, etc., they should be able to follow the docs and do it themselves.
Once Leo is available through proper package managers and cargo-binstall, the self-update mechanism becomes redundant and actively harmful in immutable environments (NixOS, Guix, Docker, Flatpak, Snap).
Remove the leo update subcommand.
Keep the check_for_updates() notification mechanism that informs users when a new version is available, pointing them to their package manager or GH releases.
This should be the final step, after the package manager options are in place.
Context
Leo currently distributes prebuilt binaries via GitHub releases and supports
cargo installfrom source.With the plugin system landing (PR #29245), Leo will ship multiple binaries (
leo+leo-fmt+ future plugins) that need to be distributed as a cohesive set. The existingleo updateself-update mechanism (#29282) conflicts with immutable environments and proper package managers.This proposal outlines a phased plan to improve Leo's distribution story end-to-end.
Phases
1. Land CLI Plugins PR
PR: #29245
The foundation for everything else. Introduces
leo-<name>plugin dispatch and migratesleo fmtto a standaloneleo-fmtbinary. GH release workflow already updated to bundle both binaries per platform.Status: PR open, ready for review.
Follow-ups (covered in later sections):
leo.nixto include plugins.leo-docs-sourcewith plugin guide.2. Improve Release Automation with Per-Crate Git Tags
Issue: #29189
Decouple release cadence so tooling (formatter, LSP) can ship independently from the compiler. A single generic CI workflow detects per-crate tags (e.g.
leo-fmt-1.0.1), verifies version matchesCargo.toml, publishes to crates.io, and builds cross-platform release binaries.Key elements:
releases.tomlrecords compatibility info (snarkVM revision, etc.).leo-fmt. Compiler-core crates remain lockstep.This is prerequisite for downstream packagers to reliably track releases.
3. Add
cargo-binstallSupportAdd
[package.metadata.binstall]to binary crateCargo.tomlfiles with URL templates pointing at GH release artifacts.Benefits:
cargo binstall leo-lang leo-fmtdownloads prebuilt binaries in seconds, avoiding the lengthy from-source builds (~10+ min with LTO).cargo binstall leo-lang@4.0.1.cargo install(source build) if no binary found.Note: users need to be mindful to switch all plugin binaries together when switching versions, since cargo-binstall installs per-crate.
4. Improve
leo.nixwith Easier Version SelectionIssue: ProvableHQ/leo.nix#18
Currently
leo.nixbuilds from source. Addleo-binandsnarkos-binderivations that fetch upstream prebuilt binaries directly, with an interface for selecting arbitrary versions - similar to howrust-overlayprovides arbitrary Rust versions.Key elements:
leo-binderivation fetching GH release artifacts by version.latestfor latest tagged release.nightlyfor latest successful master build (if applicable).leo-fmt, etc.) alongsideleo.This gives Nix users the fastest install path and proper version switching via flake inputs.
5. Document Leo's Binary Publishing Details
Add documentation to
leo-docs-sourcecovering how Leo binaries are published, so that:Documentation should cover:
leo,leo-fmt, future plugins).releases.tomlcan be used to determine version compatibility.6. Add Leo to Major Package Managers
Recommended
Homebrew tap - Create
ProvableHQ/homebrew-leowith a cask downloading the GH release zip. A GH Actions workflow on theleorepo triggers a bump PR on the tap each release. Cask naturally bundles all binaries from the zip. Largest reach for macOS developers, also works on Linux via Linuxbrew.AUR (
leo-bin) - Single PKGBUILD that downloads the GH release binary zip for linux-gnu.-binsuffix convention tells users it's prebuilt. Automate updates with Renovate bot or GH Actions pushing to AUR on release. Arch/Manjaro devs expect tools to be on AUR.nixpkgs - The
leo.nixflake already covers Nix power users. Submitting to nixpkgs adds discoverability (nix search nixpkgs leo), faster installs via the nixpkgs binary cache, and reaches users who don't know about the flake. Separate effort with minor PR review overhead, best done afterleo.nixstabilizes post-plugins.Notable mentions - omitted for now
The following could be added later if demand shows:
classicconfinement needed for compiler file access, requires Snap Store review.The binary publishing documentation (section 5) is designed to make it straightforward for community members to add Leo to their preferred package manager without our involvement. If someone wants Leo on Gentoo, Void, FreeBSD ports, Chocolatey, etc., they should be able to follow the docs and do it themselves.
7. Remove
leo updateIssue: #29282
Once Leo is available through proper package managers and cargo-binstall, the self-update mechanism becomes redundant and actively harmful in immutable environments (NixOS, Guix, Docker, Flatpak, Snap).
leo updatesubcommand.check_for_updates()notification mechanism that informs users when a new version is available, pointing them to their package manager or GH releases.This should be the final step, after the package manager options are in place.