leap

leap

leap is a faster Lean 4 toolchain written in Rust: its own parser, elaborator, meta layer and kernel. It builds Lean 4.35 projects from source in place of lake build, with results compatible with stock Lean's.

This is an internal preview. Expect rough edges and tell Gregor what breaks.

Install

curl -fsSL https://leap.mitscha-baude.at/install.sh | sh

This installs the latest release into ~/.leap and puts leap on your PATH (open a new shell afterwards). To install a specific release: curl -fsSL https://leap.mitscha-baude.at/install.sh | sh -s -- v0.1.0.

Requirements: Linux on x86_64 with AVX2 (x86-64-v3), git, a C compiler (cc) and nm. You don't need Lean, elan or Rust: the release brings everything leap reads, including its own build of Lean core and the LLVM tools it compiles native code with. A release is about 730 MB.

Use

In a project whose lean-toolchain is leanprover/lean4:v4.35.0:

Keep lean-toolchain as it is. leap reads the project's lakefile and manifest the way Lake does.

What works

Speed and memory, as of v0.1.0

Measured on 8 CPUs, full cold builds, against stock lake build on the same machine:

Both are being worked on: the targets are memory below stock everywhere, then 5× stock's speed.

Not yet

Releases and upgrades

Each release records its artifact format in metadata.json next to its tarball. Artifacts built by a release with a different format are rebuilt on first use. To uninstall, delete ~/.leap, ~/.cache/leap and the PATH line the installer added to your shell profile.