Wefti

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

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.

Wefti v0.4.0 results against CMake 4.5.1
MeasureResultScope
RunCMake cases27,953 / 27,953100.00% across 1,099 / 1,099 suites on macOS, Linux, and Windows
Strict configure comparison72 / 77Eligible repositories from a sealed set of 240
Cold configure1.31xGeometric mean across five large C++ projects on Apple M1
Configure with warm probe cache2.21xSame five projects and hardware
27,953 / 27,953
Tests/RunCMake cases pass, 100.00%
macOSarm64100.00% · 9,706 / 9,706 casespass
Linuxx86_64100.00% · 9,373 / 9,373 casespass
Windowsx86_64100.00% · 8,874 / 8,874 casespass
14,000,000
Seeded fuzz inputs
pass0 panics
6 / 6
WASI smoke
pass
62 / 62
Core conformance
passat 100%
72 / 77
Sealed holdout
failL1 strict parity
1,518 / 1,518
vcpkg ports match in 64 shards dev corpus
10 / 10
Large C++ projects match dev corpus
  • 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

37 / 40
Workloads faster than CMake
2.21x
Large C++ projects, warm cache
138.17x
No-op repeat configure (500 targets)
cmake 4.5.1
$ cmake -S . -B build-2 -G Ninja
  1. -- The CXX compiler identification is AppleClang
  2. -- Configuring done
  3. -- Generating done
cmake 4.5.11.00x
wefti
$ wefti -S . -B build-2 -G Ninja
  1. -- The CXX compiler identification is AppleClang
  2. -- Configuring done
  3. -- Generating done
wefti7.30x faster (synthetic)

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

  • WWeftiCMakeLists.txt
  • CCMake 4.5.1CMakeLists.txt
  • MuMuonmeson.build
  • MeMesonmeson.build
  • XXmakexmake.lua
  • PPremake5premake5.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.
17.50 MiBOne safe Rust executable, zero runtime dependencies
  • cmake ctest cpack ccmake
  • CMake 4.5.1 Modules and Templates
  • Ninja, Makefiles, Xcode, Visual Studio
  • wefti-lsp and a DAP debugger
  • fmt lint graph unused
  • explain watch verify doctor

Inspect, lint, and debug the build

~/demo
$ 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

Wefti and CMake 4.5.1 features
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

NinjamacOS, Linux, Windows
Ninja Multi-ConfigmacOS, Linux, Windows
Unix MakefilesmacOS, Linux
NMake MakefilesWindows
XcodemacOS
Visual Studio 17 and 18Windows (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
FortranModule scanning and compile ordering
CUDA and HIPNVCC, Clang, ROCm, separable compilation, device linking
SwiftCMP0157 split compilation, Ninja and Xcode lowering
ASM, RC, QtMASM, 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