Wefti

CMake vs Xmake, Premake, GN, and Muon

Small C++ build systems promise a simple setup. This page compares them with CMake and Wefti on the points that decide a switch.

Xmake, Premake5, GN, and Muon each need their own build files. CMake and Wefti read CMakeLists.txt. Wefti is one multi-call program that runs as cmake, ccmake, ctest, cpack, and wefti-lsp, and it keeps the CMake ecosystem that the lighter tools do not have.

How the tools differ

Each tool trades something. Xmake and Premake use Lua scripts. GN is the meta-build system of Chromium and writes Ninja files. Muon reads meson.build files and is written in C. CMake and Wefti read CMakeLists.txt and cover the widest set of packages and generators.

Lightweight C and C++ build tools
AreaWefti 0.3.0CMake 4.5.1XmakePremake5GNMuon
Project inputCMakeLists.txt, presetsCMakeLists.txt, presetsxmake.luapremake5.luaBUILD.gnmeson.build
Rewrite from CMakeNoneNoneYesYesYesYes
OutputNinja, Makefiles, Xcode, Visual StudioNinja, Makefiles, IDE projectsBuilds itself or generates projectsIDE projects and MakefilesNinja filesNinja files
ctest, cpack, and ccmakeYesYesNoNoNoNo
PackagesExisting CMake integrationsCMake toolchainsxmake-repo, vcpkg, ConanYou manage themYou manage themSet in meson.build
Written inSafe RustC++C and LuaC and LuaC++C
Sources

See the Xmake site, Premake, GN, and Muon. The Wefti and CMake columns come from the build tool comparison. The benchmarks measure Wefti against CMake only.

What one program means for Wefti

Wefti runs as cmake, ccmake, ctest, cpack, and wefti-lsp from one multi-call program. The program looks at the name you call it by. A native wefti call adds the extra commands, and the other names behave like CMake 4.5.1.

The program needs the bundled CMake 4.5.1 data folder next to it. Every install method includes that folder, except cargo binstall, which installs the program alone. The install needs no Python.

A lighter tool can still be the right pick. Premake5 and GN have a small setup for a closed project. Xmake has its own package repository. None of them reads CMakeLists.txt, so a move from CMake means writing new build files and finding new answers for your packages and tests.

Which small CMake alternative should I pick?

Wefti
Keep your CMake files and packages, and get a faster configure plus ctest, cpack, a linter, a formatter, and a language server.
Xmake
A new project with Lua build files and a built-in package repository.
Premake5
A project that needs generated Visual Studio or Xcode files from a Lua script.
GN
A large Ninja-based repository where you write the toolchain rules yourself.
Muon
A Meson project where you want to avoid a Python dependency.
CMake
You need cmake-gui, an omitted legacy generator, or behavior outside the tested Wefti scope.

Frequently asked questions

What is the best lightweight C++ build system?

It depends on your files. If you have CMakeLists.txt, Wefti is the lightest move because nothing is rewritten. For a new project, Xmake, Premake5, GN, and Muon each fit a different style.

What is a small alternative to CMake?

Wefti is a Rust program that reads your CMake files, so it replaces CMake without a rewrite. Xmake and Muon are small tools that need their own build files.

Is Xmake better than CMake?

Xmake uses Lua scripts and has its own package repository. It is a good fit for a new project that wants those. It does not read CMakeLists.txt and does not replace ctest or cpack.

How does Premake compare with CMake?

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

How does GN compare with CMake?

GN writes Ninja files for large repositories such as Chromium. You write the toolchain rules, and GN has no package integration. CMake and Wefti have vcpkg and Conan support.

Is Wefti faster than Xmake, Premake, GN, or Muon?

The published benchmarks compare Wefti with CMake 4.5.1 only. In v0.3.0, Wefti was faster than CMake in 40 / 40 workloads, from 1.09x to 39.81x. This page makes no speed claim against the other tools.