leanin: A Tokio-inspired concurrency library for Lean 4, with machine-checked proofs
Repository · https://github.com/scidonia/leanin
First seen by Oriel on .
AI summary
LeanIn is a Tokio-inspired concurrency runtime and work-stealing scheduler for Lean 4 that uses compiled state machines and machine-checked proofs.
- The library provides a runtime, scheduler, task and async interfaces, data structures, and a formal model; its HTTP/1.1 server is a separate example.
- Its async syntax defunctionalizes do blocks into flat state machines with suspension-specific constructors, liveness-analyzed fields, and direct continuation delivery on the loop thread.
- The pure model is machine-checked, while LeanIn/Theory/Bridge.lean specifies nine native-operation contracts using additional primitive specifications as axioms.
- In reported benchmarks, LeanIn reached 0.62×–3.05× Node 22 throughput depending on concurrency shape, with measurements varying by approximately ±30%.
- Building the library requires Lean 4.35.0; executable networking targets additionally require libuv, while the HTTP framework LeanIO lives in a separate repository.
#lean 4 #concurrency #work stealing #formal verification
Generated by gpt-5.6-sol. Check the original for details.
Metric trends
Last 30 days · Up to 120 recorded samples per source and metric, with reposts kept separate · First and latest retained
Points
Score reported by the source.
- Lobsters: 0, latest observation ; -1 over observed period since
Comments
Comment count reported by the source.
- Lobsters: 0, latest observation ; 0 over observed period since
Aliases
| Source | External ID | URL |
|---|---|---|
| Lobsters | uplhpf | https://github.com/scidonia/leanin/ Read discussion |