cargo-leanfran-0.7.0 is not a library.
Rust
leanfran for Rust: write Lean blocks with lean!, call them through Rust types, and verify supported Rust functions against Lean specifications.
Install
Install the Lean compiler and verification tools:
Generation requires Lean 4.35.0 (lean and lake) on PATH. Add these dependencies to your crate:
[]
= "0.7.0"
[]
= "0.7.0"
First Lean block
Add build.rs:
Then add a block to src/main.rs:
lean!
cargo build checks the Lean source and generates Rust. Commit lean/ and .leanfran/cache/ so subsequent builds can use the generated code. See the guide for publishing a crate with its cache.
Next steps
- Full Rust guide: value conversions, Lean projects,
#[model], Cargo verification, WebAssembly and limitations. - Samples and step-by-step examples.
- Development and implementation notes.