lean_rs_sys/consts.rs
1//! ABI constants for `lean-rs-sys`.
2//!
3//! The static `lean.h` layout constants (object tags, allocator ceilings) come
4//! from the link-free `lean-rs-abi`.
5//!
6//! The live toolchain identity below is baked by this crate's `build.rs` from
7//! the `lean.h` it linked against: `lean-rs-sys` links `libleanshared`, so it
8//! always has a toolchain to probe (unlike `lean-rs-abi`, which is purely
9//! static).
10
11pub use lean_rs_abi::consts::*;
12
13/// `LEAN_VERSION_STRING` from the `lean.h` this crate was built against.
14pub const LEAN_VERSION: &str = env!("LEAN_VERSION");
15
16/// Version string from the matched supported-toolchain entry.
17///
18/// Equal to [`LEAN_VERSION`] except when several releases share one `lean.h`
19/// digest, in which case it is the first version listed for that entry.
20pub const LEAN_RESOLVED_VERSION: &str = env!("LEAN_RESOLVED_VERSION");
21
22/// Filesystem path to the `lean.h` this crate built against.
23pub const LEAN_HEADER_PATH: &str = env!("LEAN_HEADER_PATH");
24
25/// SHA-256 of the resolved `lean.h`, lowercase hex.
26pub const LEAN_HEADER_DIGEST: &str = env!("LEAN_HEADER_DIGEST");