pub enum HostStage {
RuntimeInit,
Conversion,
CallbackPanic,
Link,
Load,
Internal,
Resource,
}Expand description
What the host stack was doing when it failed.
A flat tag enum; callers rarely match on it and read
HostFailure::message instead. Use LeanDiagnosticCode for the
stable, caller-facing failure taxonomy—HostStage is the
host-stack’s internal classification and may grow new variants when
new internal paths are added.
Variants§
RuntimeInit
OnceLock + lean_initialize_* panic-or-failure.
Conversion
First-order ABI value malformed (wrong kind, out of range,
invalid UTF-8, non-scalar char).
CallbackPanic
A Rust panic was contained at a Lean → Rust callback boundary.
Link
Link-time failure (missing symbol, header-digest mismatch).
Load
Load-time failure (dlopen, per-module initializer).
Internal
A pub(crate) invariant tripped. Indicates a bug in lean-rs.
Resource
A caller-configured memory, import, byte, or request budget was exhausted.