inlean-runtime
Runtime support for the Rust code that inlean generates
from Lean. Generated code calls into this crate for every primitive that Lean implements in its
C runtime: reference-counted objects, arbitrary-precision Nat and Int, strings, arrays and
closures. Each such function is a port of the function of the same name in Lean's lean.h.
The crate also holds the conversions that move values between Lean and Rust, the Rust values
of opaque and foreign types and of the library's collections, and the Rust functions behind
the operations of Vec, VecDeque, HashMap and HashSet in a block.
This crate is an implementation detail of inlean. Its API follows Lean's runtime, not Rust
conventions, and changes with the pinned Lean release: depend on inlean, which re-exports
the types user code needs (Generic, Int, Nat, ParseIntError, ParseNatError, Pass,
Primitive, TooLarge). See the
guide.
License
MIT OR Apache-2.0. The functions ported from Lean 4's lean.h are under the Apache License
2.0; see NOTICE.