Expand description
Process-wide Lean runtime anchor.
The L1 lifetime-bound owned-object handle obj::Obj (with its
borrowed view obj::ObjRef) is pub here so the sibling
lean-rs-host crate can wrap them inside its host-defined handle
types. The init cell and thread-attach helpers stay pub(crate) —
callers reach them through LeanRuntime::init and
LeanThreadGuard::attach re-exported at the crate root.
What this layer hides from the rest of the crate:
- which raw
lean_rs_syssymbols implement init and thread attach; - the order in which those symbols must be called;
- the
OnceLockcell that makes initialization process-once; - the
catch_unwindboundary that keeps Rust panics from unwinding into Lean or C frames; - the
lean_inc/lean_decdiscipline behind every owned or borrowed Lean object handle.
Modules§
- obj
- Lifetime-bound owned and borrowed Lean object handles.
Structs§
- Lean
Runtime - Handle for the process-wide Lean runtime.
- Lean
Thread Guard - RAII handle that attaches the current OS thread to the Lean runtime.