An open API service indexing awesome lists of open source software.

https://github.com/evolvinglmms-lab/lean-runner


https://github.com/evolvinglmms-lab/lean-runner

Last synced: 11 months ago
JSON representation

Awesome Lists containing this project

README

          




Lean Runner Logo

[![Documentation](https://img.shields.io/badge/Documentation-purple?style=flat-square&logo=materialformkdocs)](https://lean-runner.vercel.app/)
[![Lean Server](https://img.shields.io/pypi/v/lean-server?label=Lean%20Server&style=flat-square&color=orange&logo=pypi)](https://pypi.org/project/lean-server/)
[![Lean Runner](https://img.shields.io/pypi/v/lean-runner?label=Lean%20Runner&style=flat-square&color=orange&logo=pypi)](https://pypi.org/project/lean-runner/)
[![Docker](https://img.shields.io/badge/Hub-blue?label=Docker&style=flat-square&logo=docker&logoColor=white)](https://hub.docker.com/r/pufanyi/lean-server)

[![Python3.12](https://img.shields.io/badge/Python-3.12-blue?style=flat-square&logo=python&logoColor=white)](https://www.python.org/downloads/release/python-3120/)
[![Lean 4](https://img.shields.io/badge/Lean-4-purple?style=flat-square&logo=lean&logoColor=white)](https://lean-lang.org/doc/reference/4.22.0-rc4/releases/v4.22.0/)
[![Mathlib](https://img.shields.io/badge/Mathlib-v4.22.0--rc4-purple?style=flat-square)](https://github.com/leanprover-community/mathlib4/releases/tag/v4.22.0-rc4)
[![FastAPI](https://img.shields.io/badge/FastAPI-green?style=flat-square&logo=fastapi&logoColor=white)](https://fastapi.tiangolo.com)
[![License](https://img.shields.io/badge/License-MIT-yellow?style=flat-square)](LICENSE)

---

## Why Lean-Runner?

- **πŸš€ Plug & Play**: Get started in minutes with Docker's one-click server setup. Our intuitive client abstracts away complex implementation details, letting you focus on what mattersβ€”your Lean proofs.

- **⚑ High Performance**: Leverages REPL-based atomized execution with fully asynchronous, multi-threaded architecture to maximize CPU utilization and throughput.

- **πŸ›‘οΈ Robust & Reliable**: Persistent SQLite logging ensures your work is never lost. Built-in crash recovery and automatic retry mechanisms eliminate the frustration of interrupted workflows.

- **πŸ”„ Flexible Access Patterns**: Choose between synchronous and asynchronous clients depending on your use caseβ€”from interactive development to large-scale batch processing.

- **🧠 Smart Caching**: Intelligent content-based hashing ensures identical Lean code is processed only once, dramatically reducing computation time for repeated operations.

- **πŸ“Š Data Export & Visualization (Soon)**: Easily export data in various formats (Hugging Face, JSON, XML, Arrow, Parquet) and visualize queries with a simple CLI.

## Getting Started

Check the [quick start](https://lean-runner.vercel.app/quick-start/) guide for detailed instructions on how to get started with Lean-Runner.

## Architecture

Lean-Runner leverages a powerful Server-Client architecture that smartly places all the complex configuration on the server side, while keeping the client implementation elegantly minimal. We've packaged the entire server using [Docker](https://www.docker.com/), making deployment incredibly straightforward and hassle-free.

![](docs/assets/imgs/overview.webp)

## Project Structure

```text
lean-runner/
β”œβ”€β”€ packages/
β”‚ β”œβ”€β”€ server/ # FastAPI server implementation
β”‚ β”‚ └── lean_server/
β”‚ β”‚ β”œβ”€β”€ app/ # API endpoints and server setup
β”‚ β”‚ β”œβ”€β”€ proof/ # Lean proof execution logic
β”‚ β”‚ β”œβ”€β”€ manager/ # Proof job management
β”‚ β”‚ β”œβ”€β”€ config/ # Configuration files and loading
β”‚ β”‚ β”œβ”€β”€ database/ # SQLite persistence layer
β”‚ β”‚ └── utils/ # Utility functions
β”‚ └── client/ # Python client libraries
β”‚ └── lean_runner/
β”‚ β”œβ”€β”€ client/ # Sync and async client implementations
β”‚ └── proof/ # Proof data protocol
β”œβ”€β”€ playground/ # Lean workspace with dependencies
└── demo/ # Example scripts and test files
```

## Contributing

Contributions are welcome! Please feel free to submit issues and pull requests.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Citation

```bibtex
@misc{fanyi2025leanrunner,
title={Lean-Runner: Deploying High-Performance Lean 4 Server in One Click},
author={Fanyi Pu, Oscar Qian, Jinghao Guo, Bo Li},
year={2025},
publisher={GitHub},
howpublished={\url{https://github.com/EvolvingLMMs-Lab/lean-runner}},
}
```