CMake vs Meson, and how to get speed without a rewrite
Teams look at Meson or Muon when CMake configure feels slow. The cost of that move is a new build file in every directory.
Meson and Muon read meson.build files, so a move from CMake means rewriting every build file. Wefti reads your existing CMakeLists.txt, presets, vcpkg, and Conan setup and runs them natively in Rust. In v0.3.0, Wefti configured faster than CMake 4.5.1 in 40 / 40 workloads, from 1.09x to 39.81x, on an Apple M1. Across DuckDB, OpenCV, Protobuf, Qt Base, and LLVM, the geometric means were 1.35x cold, 2.17x with a warm probe cache, and 2.54x after a leaf edit. Those benchmarks compare Wefti with CMake only, so they include no Meson numbers.
Why teams look at Meson
Meson has a small build language and writes Ninja files, and many teams find its files easy to read. The cost arrives when a project already uses CMake. A move needs a new meson.build file for each directory, new dependency lookups, and new answers for every preset, toolchain file, and IDE setup that the team uses today.
Muon is a separate implementation of Meson written in C. It reads the same meson.build files, so a move to Muon needs the same rewrite.
| Area | Wefti 0.3.0 | CMake 4.5.1 | Meson |
|---|---|---|---|
| Project input | CMakeLists.txt, presets | CMakeLists.txt, presets | meson.build |
| Rewrite from CMake | None | None | Every build file |
| Packages | Existing CMake integrations for vcpkg, Conan, and FetchContent | CMake toolchains | Subprojects and Conan MesonToolchain |
| Output | Ninja, Makefiles, Xcode, Visual Studio | Ninja, Makefiles, IDE projects | Ninja, IDE backends |
| Developer tools | wefti-lsp, fmt, lint --fix, explain, graph | File API, trace, debugger | Introspection |
| Configure speed | Faster than CMake in 40 / 40 workloads | Baseline | Not in these benchmarks |
Sources
Only Wefti and CMake are in the v0.3.0 benchmarks. The Meson column comes from Meson dependencies and Conan for Meson.
What Wefti keeps and what it adds
Wefti is a native Rust engine for CMake 4.5.1. Your build files do not change, so a switch is easy to undo.
- Your
CMakeLists.txtfiles,CMakePresets.json(schema v13), toolchain files, andfind_package()setup stay as they are. - vcpkg and Conan keep working through their CMake integrations. In v0.3.0, 1,535 / 1,535 vcpkg ports with an observed CMake configure matched, and 2 / 2 Conan scenarios passed.
- Wefti writes Ninja, Unix Makefiles, Xcode, and Visual Studio files, and it writes
compile_commands.jsonforclangd. - Native mode runs compiler probes in parallel, shares a probe cache, replays unchanged directories, and skips unchanged Ninja generation.
In v0.3.0, Wefti configured faster than CMake 4.5.1 in 40 / 40 workloads, from 1.09x to 39.81x, on an Apple M1. Across DuckDB, OpenCV, Protobuf, Qt Base, and LLVM, the geometric means were 1.35x cold, 2.17x with a warm probe cache, and 2.54x after a leaf edit.
Try Wefti on your CMake project
Run these steps on a copy of your project. Your files stay unchanged, so you can go back to CMake at any time.
- Install Wefti. Use the release installer, Homebrew, Scoop, or Nix. Add
--alias-cmaketo the installer if you wantcmake,ctest,cpack, andccmaketo run Wefti. - Check parity on a copy. Run
wefti verifywith your own CMake 4.5.1 binary. It compares the configure result, codemodel, cache,compile_commands.json, and the Ninja dry run. - Configure with the native command. Run
wefti -S . -B build -G Ninja. Native mode turns on the probe cache and replay. - Build with your usual commands. Run
cmake --build buildandctest --test-dir build. Nothing in the project changes. - Configure again. Repeat step 3 with a new build directory and then with the same one. The probe cache and replay act on the repeats.
wefti verify --oracle /path/to/cmake-4.5.1 -- -S . -G Ninja
wefti -S . -B build -G Ninja
cmake --build build
wefti -S . -B build2 -G Ninja
When Meson is the better choice
- Wefti
- You want to keep CMake files, presets, vcpkg, and Conan, and you want a faster configure with more tools.
- CMake
- You need a generator or behavior outside the tested Wefti scope, such as
cmake-gui. - Meson or Muon
- You start a new project, you have no CMake dependencies, and your team wants to maintain
meson.buildfiles.
Frequently asked questions
Is Meson faster than CMake?
Meson has its own setup step, and the v0.3.0 benchmarks of Wefti do not measure it. They compare Wefti with CMake 4.5.1 only. Time your own project before you decide.
Can I switch from CMake to Meson without rewriting the build?
No. A full move needs meson.build files. Meson can consume some CMake subprojects, but the top-level project still needs Meson files.
What is Muon?
Muon is an implementation of Meson written in C. It reads meson.build files, so a move from CMake to Muon needs the same rewrite as a move to Meson.
Does Wefti work with vcpkg and Conan?
Yes, through the existing CMake integrations. In v0.3.0, 1,535 / 1,535 vcpkg ports with an observed CMake configure matched, and 2 / 2 Conan scenarios passed.
How do I get a faster configure and keep CMake?
Configure with the native wefti command. The names cmake, ctest, cpack, and ccmake select compatibility mode, which behaves like CMake 4.5.1 and turns off the probe cache and replay.
When should I choose Meson instead of Wefti?
Choose Meson for a new project with no CMake dependencies, when your team wants to maintain meson.build files. Run wefti verify first if your CMake build graph is complex, because 48 of 74 deterministic sealed holdout repositories passed strict L1 parity in v0.3.0.