fjrojasgarcia / elan

A Lean version manager

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

elan: Lean version manager

LicenseWindowsLinux / OS X

elan is a small tool for managing your installations of the Lean theorem prover. It places lean and leanpkg binaries in your PATH that automatically select and, if necessary, download the Lean version described in the lean_version field of your project's leanpkg.toml. You can also install, select, run, and uninstall Lean versions manually using the commands of the elan executable.

~/my/package $ cat leanpkg.toml | grep lean_version
lean_version = "nightly-2018-04-10"
~/my/package $ leanpkg -v
info: downloading component 'lean'
 14.6 MiB /  14.6 MiB (100 %)   2.2 MiB/s ETA:   0 s
info: installing component 'lean'
Lean package manager, version nightly-2018-04-10
~/my/package $ elan show
installed toolchains


active toolchain

nightly-2018-04-10 (overridden by '/home/me/my/package/leanpkg.toml')
Lean (version 3.3.1, nightly-2018-04-10, commit d36b859c6579, Release)


Linux/OS X/Cygwin/MSYS2/git bash/...: Run the following command in a terminal and follow the printed instructions:

curl -sSf | sh

Alternatively, any supported platform: Grab the latest release for your platform, unpack it, run it in a terminal, and follow the printed instructions.


On some systems elan will not work out of the box:

  • Windows 10
    • You'll need a unix-like terminal.
      • Recommended: "git bash", available via Git for Windows works well, or
      • the terminal from MSYS2, and then run pacman -S unzip git
  • macOS: Install Homebrew, then run brew install gmp coreutils. (gmp is required by lean, coreutils is required by leanpkg)


elan is basically a fork of rustup. Apart from new features and adaptions to the Lean infrastructure, these are the basic changes to the original code:

  • Replaced every mention of rustup with elan, cargo with leanpkg, and rust(c) with lean
  • Removed Windows installer... for now?
  • Removed options to configure host triple
ezoic increase your site revenue


A Lean version manager



Language:Rust 95.7%Language:Shell 4.1%Language:PowerShell 0.2%