Rust-side native call staging from pinned shims/native_lib/mod.rs.
Required leaves describe concrete compiler, allocation, and external host
operations; libffi does not acquire a fabricated pure Lean implementation.
- target : ABI.TargetDataLayout
- hostBits : Nat
- typeShape : C → ABI.TyAndLayout MIR.TyId → RvalueM S TypeShape
- lookupSymbol : C → Library → String → RvalueM S (Option (SymbolInfo Code))
- tracingEnabled : S → Bool
- placeLayout : V → ABI.TyAndLayout MIR.TyId
- placePointer : V → Except StepError (Memory.Pointer (Option P))
- resolve : C → Memory.Pointer (Option P) → Nat → RvalueM S (Memory.AllocId × Nat)
- allocation : C → Memory.AllocId → RvalueM S (RawAllocation P)
- provenanceRange : C → Memory.AllocId → Nat → Nat → RvalueM S (Array P)
- warningEmitted : S → Bool
Process-wide AtomicBool diagnostic dedup, before exposing provenance.
- setWarningEmitted : S → Bool → S
- visitExposed : C → (Memory.AllocId → RvalueM S Unit) → RvalueM S Unit
Reachability traversal is the canonical allocation visitor (including newly exposed allocations); callback mutations/errors must commit in source order.
- isLiveData : C → Memory.AllocId → RvalueM S Bool
- exposePhysical : C → Memory.AllocId → Bool → RvalueM S Unit
- rawCall : C → Code → Array OwnedArg → FfiType → ABI.Size → RvalueM S (Array UInt8 × Option (Array AccessEvent))
Actual libffi+supervisor operation. OwnedArg descriptors are consumed once.
- tryResolve : C → Memory.Pointer (Option P) → Nat → RvalueM S (Option (Memory.AllocId × Nat))
- enforceValidity : C → ABI.TyAndLayout MIR.TyId → RvalueM S Bool
- enforceRecursively : C → ABI.TyAndLayout MIR.TyId → RvalueM S Bool
- allocationFromAddress : C → Nat → Nat → RvalueM S (Option Memory.AllocId)
Exact native address resolver; length is the remaining range after popping its current byte, as in source Range::next followed by Range::len.
Instances For
A known compiler layout failure is unsupported FFI type; an unavailable compiler query remains an outer RvalueM error and is never converted to success.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Type conversion fails before any operand inspection/exposure. The explicit query fuel is an obligation on recursive compiler metadata, never a success default.
Equations
- One or more equations did not get rendered due to their size.
- Miri.Interpreter.Native.ffiType h choice 0 x✝ = throw (Miri.Interpreter.StepError.callback "native FFI recursive type query budget exhausted")
Instances For
Indirect argument inspection deliberately allows uninit and pointer bytes; it must use the outside-interpreter accessor, not normal Rust memory reads.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Full Rust-side call pipeline: lookup, argument conversion, return ABI query, reachable-memory preparation, host call, trace application, return validation.
Equations
- One or more equations did not get rendered due to their size.