All shared libs in `lib/lean` that are likely needed at load time. Includes `libleanshared`, `libleanshared_*`, `libLake_shared`, and any other `lib*shared. ` siblings.
()
| 88 | ext = shared_lib_extension() |
| 89 | lib = lean_lib_dir() / f"libleanshared{ext}" |
| 90 | if lib.exists(): |
| 91 | return lib |
| 92 | if bundle_dir(): |
| 93 | # In a bundle we must not fall through to a toolchain lookup. |
| 94 | raise RuntimeError(f"libleanshared{ext} not found in bundle {lean_lib_dir()}") |
| 95 | # Fallback: scan LEAN_PATH (less reliable, retained for back-compat). |
| 96 | try: |
| 97 | out = run_command(["lake", "env", "printenv", "LEAN_PATH"]) |
| 98 | for d in out.split(":"): |
| 99 | cand = Path(d) / f"libleanshared{ext}" |
| 100 | if cand.exists(): |
| 101 | return cand |
| 102 | except Exception: |
| 103 | pass |
| 104 | raise RuntimeError(f"libleanshared{ext} not found in {lean_lib_dir()}") |
| 105 | |
| 106 |
no test coverage detected