Wefti

Wefti vs CMake, Meson, Bazel, Xmake, and Ninja

Wefti and CMake read your CMakeLists.txt files. Meson, Bazel, and Xmake need their own build files, and Ninja runs the rules they generate.

What each tool does

C and C++ build tool comparison
AreaWefti 0.4.0CMake 4.5.1MesonBazelXmakeNinja
Project inputCMakeLists.txt, presetsCMakeLists.txt, presetsmeson.buildBUILD files, Starlarkxmake.luabuild.ninja
Configure speedFaster in 37 of 40 matched workloadsBaselineOwn setup stepLoading and analysisOwn configure stepNo configure step
CachingLocal and remote probe and configure caches, local replayPer build treePer configureLocal and remote actionsLocal compile cacheIncremental builds
OutputNinja, Makefiles, Xcode, Visual StudioNinja, Makefiles, IDE projectsNinja, IDE backendsRuns actions, remote executionBuilds itself or generates projectsRuns build.ninja
vcpkg and ConanExisting CMake integrationsCMake toolchainsSubprojects, Conan MesonToolchainExternal repositoriesxmake-repo, vcpkg, ConanFrom the generator
Developer toolsLanguage server v3, formatter, linter, and wefti explainFile API, trace, debuggerIntrospectionquery, cquery, aquerycompile_commands.jsonGraph and command tools
Written inRustC++PythonJava, sandboxed actionsC and LuaC++
Sources

The peer benchmark includes Meson and XMake. The other columns come from Meson dependencies, Conan for Meson, Bazel remote caching, Bazel sandboxing, the Ninja manual, and the Xmake site.

Configure results in v0.4.0

The peer benchmark used five runs per phase on macOS arm64. Wefti had a lower median than CMake in all six phases. With 100 targets, the cold, warm, and leaf-edit medians were 637.2 ms, 277.3 ms, and 62.1 ms for Wefti and 646.3 ms, 604.4 ms, and 159.2 ms for CMake. With 500 targets, the medians were 1,109.1 ms, 789.3 ms, and 219.6 ms for Wefti and 1,140.7 ms, 1,156.0 ms, and 565.6 ms for CMake. In the 500-target cold runs, peak resident memory was 66.7 MiB for Wefti and 82.3 MiB for CMake. See the peer results.

Across DuckDB, OpenCV, Protobuf, Qt Base, and LLVM on an Apple M1, the geometric mean speedups over CMake were 1.31x cold, 2.21x with a warm probe cache, and 2.24x after a leaf edit. Each phase used three runs. DuckDB reached 5.44x after a leaf edit. The Wefti median for LLVM was 12.35 s with a warm probe cache (1.69x) and 3.16 s after a leaf edit (1.90x). The highest peak resident memory across the five projects was 341.05 MiB for Wefti and 391.14 MiB for CMake. See the results for each project.

In a separate 500-target test, each tool reused its build tree. The repeat configure took 17.20 ms with Wefti and 2,376.55 ms with CMake (138.17x). On a fresh build tree with a warm probe cache, the synthetic test measured a 7.30x speedup. After a leaf edit in that test, the Wefti median was 58.26 ms and the 95th percentile was 58.60 ms. See the release benchmarks.

Which tool should I pick?

Wefti
Keep your CMake files and packages.
CMake
You need a generator or behavior outside the tested Wefti scope.
Meson
A new project, and your team wants to maintain meson.build files.
Bazel
A large repository that needs remote caching or remote execution.
Xmake
A new project with Lua build files and a built-in package repo.
Ninja
Use the standalone Ninja program to run build.ninja rules directly. For a Wefti project, wefti build can run these rules with its built-in executor.

Frequently asked questions

Can Meson or Bazel replace CMake without rewriting the build?

A full move normally requires Meson or Bazel project definitions. Meson can consume some CMake subprojects. Bazel can call external build systems through rules.

Does Wefti replace Ninja?

wefti build runs the generated rules with a built-in Ninja 1.13.2 executor. It needs no external Ninja program. For Ninja generators, native wefti --build uses it when the configured Ninja program is unset or unavailable. The wefti shim install ninja command adds an optional Ninja shim. The names cmake, ctest, cpack, and ccmake use CMake 4.5.1 compatibility mode.

Is Wefti faster than Meson, Bazel, or Xmake?

Wefti v0.4.0 was faster than CMake 4.5.1 in 37 of 40 matched workloads. In the separate 500-target peer benchmark, Wefti reconfigured after a leaf edit in 219.6 ms. Meson took 829.8 ms, and Xmake took 3,483.9 ms. The peer benchmark did not include Bazel.

Which tool keeps my CMake presets and toolchain files?

CMake and Wefti both read CMake presets and toolchain files. Verify a switch to Wefti with the compiler, package manager, and generator you use in production.

How does Wefti compare to Xmake?

Xmake describes a project in xmake.lua and has its own package repository. Wefti reads CMakeLists.txt files and uses your existing CMake package setup. Choose Xmake if you want to write and maintain Lua build definitions.

Which CMake alternative needs no project rewrite?

Wefti reads the CMake project that you already have. Meson, Bazel, and Xmake need their own project definitions for a full move.