Wefti

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.

Staying on CMake or moving to Meson
AreaWefti 0.3.0CMake 4.5.1Meson
Project inputCMakeLists.txt, presetsCMakeLists.txt, presetsmeson.build
Rewrite from CMakeNoneNoneEvery build file
PackagesExisting CMake integrations for vcpkg, Conan, and FetchContentCMake toolchainsSubprojects and Conan MesonToolchain
OutputNinja, Makefiles, Xcode, Visual StudioNinja, Makefiles, IDE projectsNinja, IDE backends
Developer toolswefti-lsp, fmt, lint --fix, explain, graphFile API, trace, debuggerIntrospection
Configure speedFaster than CMake in 40 / 40 workloadsBaselineNot 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.

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.

  1. Install Wefti. Use the release installer, Homebrew, Scoop, or Nix. Add --alias-cmake to the installer if you want cmake, ctest, cpack, and ccmake to run Wefti.
  2. Check parity on a copy. Run wefti verify with your own CMake 4.5.1 binary. It compares the configure result, codemodel, cache, compile_commands.json, and the Ninja dry run.
  3. Configure with the native command. Run wefti -S . -B build -G Ninja. Native mode turns on the probe cache and replay.
  4. Build with your usual commands. Run cmake --build build and ctest --test-dir build. Nothing in the project changes.
  5. 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.build files.

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.