Drop-in CMake 4.5.1 in safe Rust.
Configure existing CMakeLists.txt files and presets with one binary. Ships cmake, ctest, cpack, ccmake, and wefti-lsp.
- 27,953 / 27,953 RunCMake cases
- 1.31x cold / 2.21x warm probe
- 17.50 MiB binary
- MIT OR Apache-2.0
$ curl -fsSL https://wefti.dev/install.sh | bash $ wefti verify -S . -B build-check # diffs cache, File API, and Ninja rules against CMake 4.5.1 in a separate build dir
$ curl -fsSL https://wefti.dev/install.sh | bash
PS> irm https://wefti.dev/install.ps1 | iex
$ brew install wefti/tap/wefti
$ pip install wefti
$ wefti shim enable --write-rc $ cmake --version
Prefer not to pipe to bash? Verify SHA-256 checksums and GitHub attestations or see all install methods.
Measured against CMake 4.5.1
Wefti v0.4.0 is a clean-room Rust implementation targeting CMake 4.5.1. In the sealed holdout, 72 / 77 eligible repositories matched CMake configure output exactly (93.51%). See the holdout scope. Test your project in a separate build directory with wefti verify before switching.
| Measure | Result | Scope |
|---|---|---|
| RunCMake cases | 27,953 / 27,953 | 100.00% across 1,099 / 1,099 suites on macOS, Linux, and Windows |
| Strict configure comparison | 72 / 77 | Eligible repositories from a sealed set of 240 |
| Cold configure | 1.31x | Geometric mean across five large C++ projects on Apple M1 |
| Configure with warm probe cache | 2.21x | Same five projects and hardware |
- LLVM
- Qt Base
- OpenCV
- DuckDB
- VTK
- PyTorch
- Boost
- Blender
- rclcpp
- KCoreAddons
Use the CMake replacement guide to evaluate your workflow. If you need Cargo or CMake to build another language, read the Rust and CMake guide.
Faster configure
- -- The CXX compiler identification is AppleClang
- -- Configuring done
- -- Generating done
- -- The CXX compiler identification is AppleClang
- -- Configuring done
- -- Generating done
Synthetic project, fresh build tree, warm probe cache.
Across five large C++ projects, the geometric means were 1.31x cold, 2.21x with a warm probe cache, and 2.24x after a leaf edit.
Against other build tools
- WWefti
CMakeLists.txt - CCMake 4.5.1
CMakeLists.txt - MuMuon
meson.build - MeMeson
meson.build - XXmake
xmake.lua - PPremake5
premake5.lua
python3 tools/measure/bench_alternatives.py
The time ratios ranged from 0.97x to 138.17x across the 40 matched workloads. Wefti had a lower median than CMake in all six peer configure phases. The peer benchmark used cold, warm, and leaf edit runs at 100 and 500 targets.
How it works
No-op check
An unchanged build tree skips every listfile.
- Reads
- one stamp and token digest per input file
- Record
CMakeFiles/wefti/noop.v1.bin- 500 targets
- 17.2 ms vs 2,376.6 ms (138.17x)
$ wefti explain --why-rebuilt -B build Configure - The last configure was a no-op. Wefti reused the previous result. - The generation did not run because its inputs did not change. - No listfile, cache entry, environment variable, or argument changed.
cmakectestcpackccmake- CMake 4.5.1 Modules and Templates
- Ninja, Makefiles, Xcode, Visual Studio
wefti-lspand a DAP debuggerfmtlintgraphunusedexplainwatchverifydoctor
Inspect, lint, and debug the build
$ wefti explain --why-rebuilt -B build
--why-rebuilt-B <dir>--json
Configure - The last configure ran the listfiles and replayed the parts that did not change. - The generation ran in full. - Listfiles changed changed ~/demo/src/net/CMakeLists.txt Build - Ninja gave 5 reasons src/net/CMakeFiles/net_core.dir/net.cpp.o is dirty src/app/CMakeFiles/app.dir/main.cpp.o is dirty src/net/libnet_core.a is dirty
--diagnostics=richSource-pointed errors--profileFlamegraph and trace--export-compile-commandsOne per configuration--fetch-lock=frozenPinned FetchContent--hermetic=strictUndeclared reads fail--no-probe-cacheFresh compiler checks
Same commands, more tools
| Feature | wefti | CMake 4.5.1 |
|---|---|---|
cmake, ctest, and cpack |
yes | yes |
cmake -P and cmake -E |
yes | yes |
| Presets v13 and File API v2.12 | yes | yes |
Policies CMP0066-CMP0226 |
yes | yes |
--sarif-output |
yes | yes |
| CPack archives and installers | yes | yes |
| Ninja, Makefiles, Xcode, and Visual Studio | yes | yes |
ccmake and --debugger |
yes | yes |
| Written in | Safe Rust | C++ |
| Archive owner | uid 0, gid 0 | host owner |
| CUDA, HIP, and Swift | differsuntested in CI | yes |
| Shared probe cache | across projects | per build tree |
| Incremental configure | replays unchanged dirs | full reconfigure |
| Explain flags, deps, and rebuilds | explain --why-rebuilt |
trace output |
| Watch mode on presets and sources | wefti watch |
not available |
| Compare and verify builds | diff-config, verify |
not available |
| Formatter and linter | fmt, lint --fix |
not available |
| Unused deps and target graph | unused, graph |
--graphviz |
| Drift checks, PATH shims, and updates | doctor, shim, self-update |
not available |
| Single binary with embedded CMake data | yes | bundle directory |
--hermetic and --fetch-lock |
yes | not available |
| Language server and WebAssembly | yes | not available |
cmake-gui |
not available | yes |
| Extra IDE generators | not available | yes |
| MinGW and MSYS Makefiles | not available | yes |
| Visual Studio 2015 to 2019 | not available | yes |
wefti build uses a built-in Ninja 1.13.2 executor written in safe Rust. Opt-in commands include wefti new and wefti init for project setup. wefti env prints or applies toolchain variables. wefti modernize previews CMake rewrites.
wefti add and wefti remove manage dependencies in wefti.lock. Run tests with wefti test. Use wefti sbom to list dependencies and wefti audit to check them.
Check the remote probe and configure cache with wefti cache remote. Restore or upload entries with wefti cache pull or wefti cache push. The actions/setup-wefti action uses Node.js 24 and enables GitHub Actions Cache v2. See the CI cache guide.
wefti-lsp v3 shows evaluated inlay hints and opens dependency definitions with Go to Definition. Code lenses show actions above target and package declarations. See the language server guide.
Generators
| Ninja | macOS, Linux, Windows |
|---|---|
| Ninja Multi-Config | macOS, Linux, Windows |
| Unix Makefiles | macOS, Linux |
| NMake Makefiles | Windows |
| Xcode | macOS |
| Visual Studio 17 and 18 | Windows (2022 and 2026) |
Languages and toolchains
| C and C++ | C90 to C23, C++20 and C++23 named modules, CXX_MODULES |
|---|---|
| Objective-C / C++ | Apple frameworks, bundles, Mach-O RPATH |
| Fortran | Module scanning and compile ordering |
| CUDA and HIP | NVCC, Clang, ROCm, separable compilation, device linking |
| Swift | CMP0157 split compilation, Ninja and Xcode lowering |
| ASM, RC, Qt | MASM, NASM, Windows resources, AUTOMOC, AUTOUIC, AUTORCC |
Common questions
Can I swap Wefti in for CMake 4.5.1?
Yes. One wefti binary runs as cmake, ctest, cpack, ccmake, or wefti-lsp and reads your existing CMakeLists.txt files, presets, and caches. In v0.4.0, 72 of 77 eligible holdout repositories matched CMake configure output exactly. Run wefti verify on your project before you switch.
Which generators and languages does it support?
Wefti generates Ninja, Ninja Multi-Config, Unix Makefiles, NMake Makefiles, Xcode, Visual Studio 17 2022, and Visual Studio 18 2026. It builds C, C++ with modules, Objective-C, Fortran, CUDA, HIP, Swift, and Qt projects, and it has no cmake-gui.
Why is configure faster?
Wefti uses a SHA-256 digest of each compiler probe input to find results it can reuse across projects. Incremental configure replays the results for directories that did not change. Wefti v0.4.0 was faster in 37 of 40 matched workloads. The ratios ranged from 0.97x to 138.17x.
How do I install it, and which tools come with it?
On Linux and macOS, run curl -fsSL https://wefti.dev/install.sh | bash. The install guide covers Windows, Homebrew, Scoop, WinGet, and Nix. You also get wefti explain, fmt, lint --fix, graph, verify, and the wefti-lsp language server.
Is it safe Rust, and how is it licensed?
Wefti is new Rust code with no copied or translated CMake C++ code. The only unsafe Rust is the audited Windows process interface in wefti-winproc/src/ffi.rs. Wefti uses MIT OR Apache-2.0, and the bundled CMake 4.5.1 modules keep BSD-3-Clause.
Verify on your repo before you switch
Install Wefti alongside your existing CMake and diff a fresh build directory before changing any script or preset.
$ curl -fsSL https://wefti.dev/install.sh | bash $ wefti verify -S . -B build-check