Lean 4 fork for HoTT-compatible kernel extensions (Path types, transport, HITs). Maintained against upstream leanprover/lean4.
This PR fixes a build issue when Lean is not linked against libuv. ## Problem In `src/runtime/uv/dns.cpp`, the non-libuv stub of `lean_uv_dns_get_info` (in the `#else` branch, compiled when building without libuv) has a **4-parameter** signature: ```cpp lean_uv_dns_get_info(b_obj_arg name, b_obj_arg service, uint8_t family, int8_t protocol) ``` But the real implementation above the `#else` has only **3 parameters**: ```cpp lean_uv_dns_get_info(b_obj_arg name, b_obj_arg service, uint8_t family) ``` The Lean `@[extern]` declaration also expects 3 parameters. The stub has an extra `int8_t protocol` parameter that the real function and the Lean FFI caller do not use. ## Fix Remove the extra `protocol` parameter from the stub so both branches have the same signature. ## Evidence Discovered while building Lean4 to WASM via Emscripten for a production project ([specify-lean](https://github.com/kjsdesigns/specify)) since v4.27.0. The stub branch is compiled in this configuration, and the signature mismatch was caught at link time. The fix has been stable in production across multiple Lean version bumps. Related: [Zulip thread on WASM build fixes](https://leanprover.zulipchat.com/#narrow/channel/270676-lean4/topic/WASM.20build.20fixes.3A.20libuv.20symbol.20leakage.20.28.236817.29.20and.20unique_lo/with/580836892) (2026-03-21). Co-authored-by: Keith Seim <keith@MacBook-Pro.local> |
||
|---|---|---|
| .claude | ||
| .github | ||
| .vscode | ||
| doc | ||
| images | ||
| releases_drafts | ||
| script | ||
| src | ||
| stage0 | ||
| tests | ||
| .gitattributes | ||
| .gitignore | ||
| .gitpod.Dockerfile | ||
| .gitpod.yml | ||
| .ignore | ||
| CMakeLists.txt | ||
| CMakePresets.json | ||
| CODEOWNERS | ||
| CONTRIBUTING.md | ||
| flake.lock | ||
| flake.nix | ||
| lean-toolchain | ||
| LICENSE | ||
| LICENSES | ||
| README.md | ||
| RELEASES.md | ||
This is the repository for Lean 4.
About
- Quickstart
- Homepage
- Theorem Proving Tutorial
- Functional Programming in Lean
- Documentation Overview
- Language Reference
- Release notes starting at v4.0.0-m3
- Examples
- External Contribution Guidelines
Installation
See Install Lean.
Contributing
Please read our Contribution Guidelines first.
Building from Source
See Building Lean.