A drop-in CMake replacement in Rust
Yes. Wefti is a drop-in replacement for CMake 4.5.1 written in Rust. It reads your existing CMakeLists.txt files and generates build files for the same toolchain. One binary provides cmake, ccmake, ctest, and cpack entry points.
Wefti is an independent drop-in CMake replacement written in Rust. It reads existing CMakeLists.txt files and presets. Wefti v0.4.0 passed all 27,953 upstream RunCMake cases on macOS, Linux, and Windows. On a sealed set of 240 repositories, it passed strict configure checks on 72 of 77 eligible repositories (93.51%).
Verified compatibility with CMake 4.5.1
The table shows the v0.4.0 results. RunCMake recorded zero failures on all three operating systems. Use wefti verify to compare your project with CMake 4.5.1. The compatibility report explains the test scope and links to the frozen data.
Start with the migration procedure to compare two build directories. To compare configuration time, use the configure measurement procedure.
| Area | Coverage |
|---|---|
Tests/RunCMake | 27,953 / 27,953 cases (100.00%) across 1,099 / 1,099 targeted suites. macOS passed 9,706 / 9,706 cases in 371 / 371 suites. Linux passed 9,373 / 9,373 cases in 362 / 362 suites. Windows passed 8,874 / 8,874 cases in 366 / 366 suites. |
| Large C++ projects | 10 / 10 passed strict L1 configure parity. 10 / 10 passed L2 Ninja dry-run parity. |
| vcpkg | 1,518 / 1,518 scored CMake ports matched (100.00%) across 64 / 64 shards. The test inspected 2,621 ports and found zero mismatches. Wefti completed 1,826 installs, and CMake completed 1,818. |
| Policies | 161 active policies from CMP0066 to CMP0226. CMP0000 to CMP0065 always use NEW behavior. |
| Presets and File API | Presets schema v13 and File API codemodel v2.12 |
| Generators | Ninja, Ninja Multi-Config, Unix Makefiles, NMake Makefiles, Xcode, Visual Studio 17 2022, and Visual Studio 18 2026 |
In v0.4.0, 76 of 78 eligible repositories in the sealed set configured successfully (97.44%). Strict L1 parity compares configure results and outputs with CMake. The strict pass rate rose from 68.92% in v0.3.1 to 93.51% in v0.4.0 (72 of 77 eligible repositories). The v0.4.0 holdout recorded zero find-module failures. Verify your own project before changing the build in production. Use upstream CMake if your workflow requires cmake-gui or an omitted generator.
Switch tools without rewriting your project
The standalone v0.4.0 binary for macOS arm64 is 17.50 MiB (18,352,560 bytes). It is 0.89 MiB smaller than the v0.3.1 binary (18.39 MiB). The measured install size was 25.74 MiB for Wefti and 250.62 MiB for CMake. The measurement method is in the peer benchmark.
The workspace has 43 Rust crates. Of these, 42 forbid unsafe. The sole exception is the audited Windows interface for process handling in crates/wefti-winproc/src/ffi.rs. See ADR-056.
Use wefti build to run Ninja build rules with the built-in executor. The names cmake, ctest, cpack, and ccmake use CMake 4.5.1 compatibility mode. For build, test, dependency, and cache commands, see the native workflow tools.
- Install the release. Follow the installation guide. Pass
--alias-cmakeon macOS or Linux, or-AliasCmakeon Windows, to give your existing scripts the command names they expect. - Verify your project. Keep a separate CMake 4.5.1 binary available. The verifier stages isolated copies and checks configure results, the File API model, and Ninja dry-run commands.
wefti verify --oracle /path/to/cmake-4.5.1 -- -S . -G Ninja
- Choose a mode. Use the
cmakealias for the compatibility persona, which follows the upstream command and output conventions. Callweftifor the native persona, which adds the shared probe cache, incremental replay, and tools for a better CMake workflow. - Run your build and tests. Use the same generator, compiler, and options you already use. Start in a fresh build directory for the first comparison.
cmake -S . -B build-wefti -G Ninja
cmake --build build-wefti
ctest --test-dir build-wefti
See how to speed up configure once your project passes its checks. To weigh other build systems, read best CMake alternative.
Frequently asked questions
Can I keep my existing CMakeLists.txt files?
Yes. Wefti reads CMakeLists.txt files, CMake Presets v13, and CMakeCache.txt. Start with a fresh build directory to compare results with CMake 4.5.1.
Does Wefti require upstream CMake?
The Wefti engine runs on its own. The separate wefti-verify companion needs a CMake 4.5.1 binary for explicit side-by-side checks.
How do I replace cmake in a build script?
Install with --alias-cmake on macOS or Linux, or -AliasCmake on Windows. Put the install bin directory first on PATH and check cmake --version from the same environment as the build.
Does Wefti work with vcpkg and Conan?
Yes. In v0.4.0, Wefti matched CMake configure results on 1,518 / 1,518 scored vcpkg ports. Wefti also passed 2 / 2 Conan scenarios.
What does drop-in replacement mean for Wefti?
Existing scripts can call cmake, ctest, cpack, and ccmake and get CMake 4.5.1 flags, output, and exit codes in compatibility mode. Project files stay unchanged. Native features need the wefti command name.
When should I keep upstream CMake?
Keep upstream CMake if you need cmake-gui, a legacy extra generator, a MinGW or MSYS Makefile generator, or Visual Studio 2015 to 2019. Keep it also if wefti verify reports a difference that affects your build.