1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
//! High-level surface for hosting Lean capabilities.
//!
//! Sits on top of the [`lean_rs::module`] dispatch primitives. The four-piece
//! shape is pinned by `docs/architecture/04-host-stack.md`:
//!
//! - L1 handles ([`lean_rs::handle::LeanName`],
//! [`lean_rs::handle::LeanLevel`], [`lean_rs::handle::LeanExpr`],
//! [`lean_rs::handle::LeanDeclaration`]) ship in the FFI primitive
//! crate `lean-rs`; the session methods here take and return them.
//! - [`LeanHost`], [`LeanCapabilities`], [`LeanSession`] — Lake-project
//! entry point, capability loading (with pre-resolved session symbol
//! addresses cached at load time), and a long-lived session that owns
//! the imported `Lean.Environment` and dispatches every typed query,
//! elaboration, kernel check, bulk operation, and meta call.
//! - [`elaboration`] — bounded [`elaboration::LeanElabOptions`], typed
//! [`elaboration::LeanDiagnostic`] / [`elaboration::LeanElabFailure`],
//! and the published byte / heartbeat ceilings consumed by
//! [`LeanSession::elaborate`] and [`LeanSession::kernel_check`].
//! - [`evidence`] — opaque [`evidence::LeanEvidence`] kernel-checked
//! evidence handle plus the [`evidence::EvidenceStatus`] /
//! [`evidence::LeanKernelOutcome`] taxonomy returned by
//! [`LeanSession::kernel_check`], and the bounded
//! [`evidence::ProofSummary`] projection returned by
//! [`LeanSession::summarize_evidence`].
//!
//! Two further pieces sit alongside but stay at sub-module paths:
//! [`meta`] for the optional bounded `MetaM` capability (only
//! [`LeanSession::run_meta`] touches it), and [`pool`] for the
//! capacity-bounded [`pool::SessionPool`] / [`pool::PooledSession`]
//! reuse helper.
//!
//! ## Cascade
//!
//! ```ignore
//! let runtime = lean_rs::LeanRuntime::init()?;
//! let host = lean_rs::LeanHost::from_lake_project(runtime, lake_root)?;
//! let caps = host.load_capabilities("my_pkg", "MyLib")?;
//! let mut sess = caps.session(&["MyLib.SomeModule"])?;
//! let decl = sess.query_declaration("MyLib.SomeModule.myDef")?;
//! ```
//!
//! Construction or inspection of the handle types in [`lean_rs::handle`]
//! outside of a session goes through Lean fixture exports reached via
//! [`lean_rs::module::LeanModule::exported`].
pub
pub use LeanCapabilities;
pub use LeanHost;
pub use ;
pub use ;