xmake is a lightweight cross-platform build utility based on Lua.
It uses xmake.lua to maintain project builds.
Compared with makefile/CMakeLists.txt, the configuration syntax is more concise and intuitive.
It is very friendly to novices and can quickly get started in a short time.
Let users focus more on actual project development.
XMake is a lightweight cross-platform build utility designed to simplify and accelerate the development process for C/C++ projects. Built on Lua, it provides a modern alternative to traditional build systems by offering a simple yet powerful configuration syntax in xmake.lua.
Key Features:
Cross-Platform Support: XMake works seamlessly across multiple platforms, including Windows, macOS, Linux, Android, iOS, and others.
Concise Configuration Syntax: The Lua-based syntax is intuitive and easy to learn, making it faster to set up and maintain build configurations compared to makefile or CMakeLists.txt.
Built-in Package Management: XMake integrates with a package manager to simplify dependency management, allowing users to easily add and manage third-party libraries.
User-Friendly: Designed with novices in mind, XMake provides quick setup and startup times, enabling developers to focus on coding rather than build configurations.
Fast Compilation: Supports parallel compilation for rapid build times, even for large projects.
Extensive Language Support: Handles multiple programming languages and mixed-language projects, including C/C++, Assembly, Golang, Rust, and more.
Audience & Benefit:
Ideal for developers, particularly those working on cross-platform or embedded systems, XMake streamlines the build process. It empowers users to achieve faster development cycles by reducing configuration complexity and enabling efficient dependency management. Whether you're building a small project or a large-scale application, XMake helps you stay productive.
README
xmake
A cross-platform build utility based on LuaModern C/C++ build tool: Simple, Fast, Powerful dependency package integration
Support this project
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. 🙏
Technical support
You can also consider sponsoring us to get extra technical support services via the Github sponsor program. If you do, you can get access to the xmake-io/technical-support repository, which has the following benefits:
Xmake is a cross-platform build utility based on the Lua scripting language.
Xmake is very lightweight and has no dependencies outside of the standard library.
Uses the xmake.lua file to maintain project builds with a simple and readable syntax.
Xmake can be used to directly build source code (like with Make or Ninja), or it can generate project source files like CMake or Meson. It also has a built-in package management system to help users integrate C/C++ dependencies.
If you don't want to use the above scripts to install Xmake, visit the Installation Guide for other installation methods (building from source, package managers, etc.).
$ xmake show -l toolchains
xcode Xcode IDE
msvc Microsoft Visual C/C++ Compiler
clang-cl LLVM Clang C/C++ Compiler compatible with msvc
yasm The Yasm Modular Assembler
clang A C language family frontend for LLVM
go Go Programming Language Compiler
dlang D Programming Language Compiler (Auto)
dmd D Programming Language Compiler
ldc The LLVM-based D Compiler
gdc The GNU D Compiler (GDC)
gfortran GNU Fortran Programming Language Compiler
zig Zig Programming Language Compiler
sdcc Small Device C Compiler
cuda CUDA Toolkit (nvcc, nvc, nvc++, nvfortran)
ndk Android NDK
rust Rust Programming Language Compiler
swift Swift Programming Language Compiler
llvm A collection of modular and reusable compiler and toolchain technologies
cross Common cross compilation toolchain
nasm NASM Assembler
gcc GNU Compiler Collection
mingw Minimalist GNU for Windows
gnu-rm GNU Arm Embedded Toolchain
envs Environment variables toolchain
fasm Flat Assembler
tinycc Tiny C Compiler
emcc A toolchain for compiling to asm.js and WebAssembly
icc Intel C/C++ Compiler
ifort Intel Fortran Compiler
ifx Intel LLVM Fortran Compiler
muslcc The musl-based cross-compilation toolchain
fpc Free Pascal Programming Language Compiler
wasi WASI-enabled WebAssembly C/C++ toolchain
nim Nim Programming Language Compiler
circle A new C++20 compiler
armcc ARM Compiler Version 5 of Keil MDK
armclang ARM Compiler Version 6 of Keil MDK
c51 Keil development tools for the 8051 Microcontroller Architecture
icx Intel LLVM C/C++ Compiler
dpcpp Intel LLVM C++ Compiler for data parallel programming model based on Khronos SYCL
masm32 The MASM32 SDK
iverilog Icarus Verilog
verilator Verilator open-source SystemVerilog simulator and lint system
cosmocc build-once run-anywhere
hdk Harmony SDK
ti-c2000 TI-CGT C2000 compiler
ti-c6000 TI-CGT C6000 compiler
iararm IAR ARM C/C++ Compiler
kotlin-native Kotlin Native Programming Language Compiler
Supported languages
C and C++
Objective-C and Objective-C++
Swift
Assembly
Golang
Rust
Dlang
Fortran
Cuda
Zig
Vala
Pascal
Nim
Verilog
FASM
NASM
YASM
MASM32
Cppfront
Kotlin
Features
Xmake exhibits:
Simple yet flexible configuration grammar.
Quick, dependency-free installation.
Easy compilation for most all supported platforms.
Supports cross-compilation with intelligent analysis of cross toolchain information.
Extremely fast parallel compilation support.
Supports C++ modules (new in C++20).
Supports cross-platform C/C++ dependencies with built-in package manager.
Multi-language compilation support including mixed-language projects.
Rich plug-in support with various project generators (ex. Visual Studio/Makefiles/CMake/compile_commands.json)
REPL interactive execution support
Incremental compilation support with automatic analysis of header files
Built-in toolchain management
A large number of expansion modules
Remote compilation support
Distributed compilation support
Local and remote build cache support
Supported Project Types
Xmake supports the below types of projects:
Static libraries
Shared libraries
Console/CLI applications
CUDA programs
Qt applications
WDK drivers (umdf/kmdf/wdm)
WinSDK applications
MFC applications
Darwin applications (with metal support)
Frameworks and bundles (in Darwin)
SWIG modules (Lua, Python, ...)
LuaRocks modules
Protobuf programs
Lex/Yacc programs
Linux kernel modules
Package management
Download and build
Xmake can automatically fetch and install dependencies!
Supported package repositories
Official package repository xmake-repo (tbox >1.6.1)
The github-action-setup-xmake plugin for GitHub Actions can allow you to use Xmake with minimal efforts if you use GitHub Actions for your CI pipeline.
The list of people and projects who are using Xmake is available here.
If you are using Xmake, you are welcome to submit your information to the above list through a PR, so that other users and the developers can gauge interest. This also lets users use xmake more confidently and gives us motivation to continue to maintain it.
This will help the Xmake project and it's community grow stronger and expand!