Fork of Lean 4.27.0 with an experimental bytecode compiler targeting a Rust VM.
make -j -C build/releaseUse the -Y flag to emit bytecode:
export LEAN_PATH="$(pwd)/build/release/stage1/lib/lean"
./build/release/stage1/bin/lean -Y output.leanbc input.leanSet backend := .vm in your lakefile:
@[default_target]
lean_exe myapp where
root := `Main
backend := .vmThen lake build produces .leanbc files in .lake/build/ir/.
Use lean4-vm to execute bytecode:
lean4-vm program.leanbc
lean4-vm -L ./bc/ program.leanbc # Load dependencies from directory| Variable | Description |
|---|---|
LEAN_PATH |
Search path for .olean files during compilation |
Apache 2.0