Choose your path#
LIBRA has two interfaces that work together. Understanding what each does will help you decide where to start.
|
CMake framework only |
|
|---|---|---|
What it is |
A Rust binary that wraps |
A collection of CMake modules you include in your |
What it requires |
Cargo (Rust toolchain) to install; CMake and your build tools to run. |
CMake >= 3.31. No Rust required. |
Typical command |
|
|
Escape hatch |
Drop it at any time — |
N/A — this is the escape hatch. |
The two interfaces are not mutually exclusive. The CLI is a convenience layer; the CMake framework is always underneath it.
Which should I use?#
Use clibra if:
You have Rust / Cargo installed, or are willing to install it.
You want short commands for common workflows (build, test, coverage, analysis) without remembering preset flag syntax.
You are starting a new project and want
clibra doctorto verify your environment before you begin.
→ Continue to Installation.
Use the CMake framework directly if:
You cannot or do not want to install Rust.
You are integrating LIBRA into an existing CMake project that already has its own build scripts.
You need to stay within a pure-CMake toolchain (e.g., for CI images that do not include Rust).
The CLI can always be added later. CMake presets written for a
CMake-only workflow are fully compatible with clibra.
→ Continue to Installation.
What the CLI does and does not do#
clibra is a thin wrapper, not a build system. It:
Resolves a preset name and passes it to
cmake/cmake --build/ctest.Detects whether a configure step is needed before building.
Checks that required
LIBRA_*feature flags are set before running commands that depend on them (e.g.,LIBRA_TESTS=ONbeforeclibra test).Provides
clibra infoandclibra doctorfor inspecting build state and environment health.
It does not:
Manage dependencies or compilers.
Replace
CMakePresets.jsonor add its own configuration layer on top.Require any prior
clibrainvocation — a fresh checkout with a valid preset file works immediately.