What is Lean written in?
The Lean runtime is written in C++.
Lean is a software for interactive and automated theorem proving, first released in 2013.
Implementation
| Layer | Written in | Notes |
|---|---|---|
| Runtime | C++ | Lean 4 compiles via a C backend and a C++ runtime. |
Runtime model
The Lean runtime, written in C++, manages the execution of Lean programs. Runtime-based languages rely on a host process to interpret or compile code at runtime rather than compiling entirely ahead-of-time to native machine code. This means running Lean programs requires the runtime to be present on the target system.
The choice of C++ for the runtime gives Lean access to native performance, established platform abstractions, and existing ecosystem libraries.
Explore in the Graph
See Lean's full lineage, including all implementation and influence relationships, in the interactive graph.
Open Interactive Graph →Or view the Lean language page for the complete record.