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.
curl -fsSL https://leap.mitscha-baude.at/install.sh | shThis 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.
In a project whose lean-toolchain is
leanprover/lean4:v4.35.0:
leap build [TARGET…]: builds the targets (the default
targets when none is named), as lake build does.
Dependencies, Mathlib included, are built from source on first use and
kept in ~/.cache/leap. Messages print as Lake prints them,
and the exit status is 1 when a module fails.leap exe NAME [ARG…]: builds the executable NAME and
runs it with the arguments.leap lean FILE: builds the module whose source is FILE
and prints its messages.leap -d DIR …: runs the command in the project at DIR
instead of the current directory.Keep lean-toolchain as it is. leap reads the project's
lakefile and manifest the way Lake does.
extern_lib,
moreLinkObjs and precompiled modules; executables.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.
.olean files, so stock Lean and Lake can't use what leap
built. Using leap means using it for the project's whole build.lake env, lake test and
lake script.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.