xmake-io/xmake logo

xmake-io/xmake

Free

🔥 A cross-platform build utility based on Lua

FreeFree tier
Type
Open Source

About xmake-io/xmake

Xmake is a cross-platform build utility based on the Lua scripting language. It is very lightweight and has no external dependencies beyond the standard library. Xmake uses a simple and readable xmake.lua file to maintain project builds. It can directly build source code (similar to Make or Ninja) or generate project files (like CMake or Meson). Additionally, it includes a built-in package management system for integrating C/C++ dependencies, and supports remote/distributed builds and caching (like distcc and ccache/sccache). Xmake supports a wide range of platforms including Windows, macOS, Linux, FreeBSD, Android, iOS, WatchOS, and more.

Key Features

Cross-platform build utility based on Lua
Lightweight with no external dependencies
Simple and readable xmake.lua syntax for project configuration
Can directly compile source code or generate project files for IDEs
Built-in package management system for C/C++ dependencies
Supports remote/distributed builds and caching (distcc, ccache/sccache)
Extensive platform support: Windows, macOS, Linux, FreeBSD, Android, iOS, WatchOS, AppleTVOS, Solaris, and more
Command-line interface with build, run, debug, test, and configuration commands
Menu-driven configuration (xmake f --menu)

Pros & Cons

Pros
  • Very lightweight and requires no external runtime dependencies
  • Simple and readable build configuration with Lua scripting
  • Cross-platform support for many operating systems and architectures
  • Built-in package manager for easy dependency integration
  • Can function as both a build system and a project generator
  • Actively maintained with 18,000+ commits and a large community
Cons
  • Requires learning Lua syntax for build configuration
  • Smaller ecosystem of pre-built packages compared to vcpkg or Conan
  • Less mature and fewer resources than established tools like CMake

Best For

Building C and C++ projects across multiple platformsManaging third-party C/C++ dependencies in a projectGenerating IDE project files from a simple Lua configurationSetting up distributed or cached builds for larger codebasesAutomating compilation, testing, and debugging in CI/CD pipelines

FAQ

What is Xmake?
Xmake is a cross-platform build utility based on the Lua scripting language. It can be used to build C/C++ source code directly or generate project files, and includes a built-in package management system.
How do I install Xmake?
Xmake can be installed via curl, wget, or PowerShell scripts. For example, using curl: curl -fsSL https://xmake.io/shget.text | bash. Other installation methods include building from source or using system package managers.
What platforms does Xmake support?
Xmake supports Windows, macOS, Linux, FreeBSD, NetBSD, OpenBSD, DragonflyBSD, Solaris, Android, iOS, WatchOS, and AppleTVOS across various architectures including x86, arm, riscv, and more.
Can Xmake generate project files for IDEs?
Yes, Xmake can generate project files similar to CMake or Meson, allowing integration with many IDEs.
Does Xmake have a package manager?
Yes, Xmake has a built-in package management system to help integrate C/C++ dependencies. The official package repository is xmake-io/xmake-repo.