Wefti

CMake vs Muon and Premake, and how to get the fastest configure you can measure

Muon reads meson.build files, and Premake5 reads premake5.lua files. Wefti and CMake read CMakeLists.txt files. With 500 generated targets, the median time after an edit in one directory was 220 ms for Wefti v0.4.0, 566 ms for CMake, 211 ms for Muon, and 952 ms for Premake5.

Why Muon and Premake come up

Muon is a C implementation of Meson. It reads the same meson.build files, so it needs the same rewrite as Meson. Premake5 describes a project in Lua, writes Makefiles and IDE projects, and leaves package management to you. Each tool is small and quick to start, and each asks you to replace the build files that CMake reads today.

Staying on CMake or moving to Muon or Premake5
AreaWefti 0.4.0CMake 4.5.1MuonPremake5
Project inputCMakeLists.txt, presetsCMakeLists.txt, presetsmeson.buildpremake5.lua
Rewrite from CMakeNoneNoneEvery build fileEvery build file
PackagesExisting CMake integrations for vcpkg, Conan, and FetchContentCMake toolchainsSet in meson.buildYou manage them
OutputNinja, Makefiles, Xcode, Visual StudioNinja, Makefiles, IDE projectsNinja filesIDE projects and Makefiles
ctest, cpack, and ccmakeYesYesNoNo
Sources

See the tool documentation for Muon and Premake.

Configure times for 100 and 500 targets

Wefti had a lower median than CMake in all six comparisons. Muon, a C implementation of the Meson language, had lower cold, warm, and leaf edit medians than Wefti at both target counts. Premake5 generates files without probing the compiler.

The benchmark used five runs for each tool and target count. Cold runs started with an empty build directory and empty tool caches. Warm runs started with an empty build directory and kept the tool caches. The leaf edit changed a compiler definition in one directory. The memory column gives the highest resident memory use of a single process during cold configure.

Peer benchmark median times and peak memory
TargetsToolCold (ms)Warm (ms)Leaf edit (ms)Peak memory (MiB)
100Wefti6372776237.9
100CMake64660415937.8
100Muon2312325036.9
100Premake519719618721.3
100Meson1,1741,19941450.1
100XMake1,6051,6041,59744.8
500Wefti1,10978922066.7
500CMake1,1411,15656682.3
500Muon42341721137.1
500Premake51,0451,05095261.2
500Meson1,6511,64583064.5
500XMake3,5173,4843,484105.0

Time every tool yourself

The script generates one C and C++ project and writes the same sources and matching build files for every tool. It measures a cold configure, a warm configure, and an incremental reconfigure after a leaf edit. It also records peak memory, executable size, and installed size, and it reports a tool that is not installed as unavailable. Every tool writes Ninja files.

python3 tools/measure/bench_alternatives.py --targets 100,500 --runs 5 --leaf-edit define --out-json bench-alt.json --out-md bench-alt.md

Run it with your own install of each tool. The peer benchmark gives the full results.

Which tool should I pick?

Wefti
Keep your CMake files, presets, and packages. Use wefti build to run the generated Ninja rules with the built-in executor. The names cmake, ctest, cpack, and ccmake use CMake 4.5.1 compatibility mode.
CMake
You need cmake-gui, an omitted legacy generator, or behavior outside the tested Wefti scope.
Muon
You have a Meson project and want to avoid a Python dependency. The CMake vs Meson guide covers the Meson side.
Premake5
You need generated Visual Studio or Xcode files from a Lua script. The Xmake, Premake, and GN guide compares it with other small tools.

Frequently asked questions

What is the difference between CMake and Muon?

CMake reads CMakeLists.txt. Muon is a C implementation of Meson and reads meson.build, so it needs a different set of build files. Wefti runs the CMake files that you already have.

Is Muon faster than CMake?

Yes, in this peer benchmark. With 500 generated targets, the median times for Muon were 423 ms cold, 417 ms warm, and 211 ms after a leaf edit. The times for CMake were 1,141 ms cold, 1,156 ms warm, and 566 ms after a leaf edit. The tools read different build files.

How does Premake compare with CMake?

Premake5 writes Makefiles and IDE projects from Lua scripts and leaves packages to you. CMake and Wefti also run tests with ctest and build packages with cpack.

What is the fastest C++ build configure?

The result depends on the project and the configure phase. With 500 generated targets, Muon had the lowest median in each phase. Wefti had the lower median in each phase among the two tools that read CMake project files. Premake5 generates files without probing the compiler.

Is there a Meson or Muon alternative for CMake projects?

Yes, Wefti. It reads your CMakeLists.txt, presets, vcpkg, and Conan setup, so a CMake project gets a Rust configure engine without a rewrite.

When should I choose Muon or Premake instead of Wefti?

Choose Muon for a Meson project when you want to avoid a Python dependency. Choose Premake5 to generate Visual Studio or Xcode projects from Lua. If your project uses CMake, run wefti verify before switching to Wefti. In v0.4.0, 72 of 77 eligible repositories (93.51%) in the sealed blind holdout matched CMake under the strict L1 configure checks.