inlean-runtime 0.2.0

Runtime support for Rust code generated from Lean by inlean
Documentation
  • Coverage
  • 29.55%
    221 out of 748 items documented4 out of 649 items with examples
  • Size
  • Source code size: 213.6 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 5.2 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 3s Average build duration of successful builds.
  • all releases: 3s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • shergin/inlean
    7 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • shergin

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.