6.1. Recommended Build
cmake -B build -S . -DL4YAML_BUILD_RUST=ON cmake --build build -j cmake --install build --prefix /path/to/stage
The --install step is optional; it stages the artifacts into a
standard ${prefix}/{bin,lib,include} layout plus the compiled
Lean module tree under ${prefix}/lib/lean/.
The build produces, in order:
-
The Lean library, proof modules, compile-time guards, and every executable in the
L4YAML_EXESlist (a superset of thedefaultTargetsfromlakefile.toml), driven bylake build. -
libl4yaml.soand the C exampletryparse_c, defined inffi/CMakeLists.txt. -
The Rust workspace (
l4yaml-sys,l4yaml) and thetryparse_rsexample, driven bycargo build --release --workspace --examples.
The installed C and Rust binaries have RPATHs that resolve
libl4yaml.so via $ORIGIN/../lib and libleanshared.so from the
Lean toolchain, so they work directly out of the install tree.