xmake-style

Installation
SKILL.md

Xmake Configuration Style & Conventions

xmake.lua is Lua, but idiomatic xmake code looks less like Lua and more like a declarative configuration. Following the conventions below keeps files readable, fast to parse, and consistent with the style used throughout xmake and xmake-repo.

1. The description / script split (the single most important rule)

xmake.lua has two domains and they have very different rules.

Description domain — keep it declarative

This is the top-level body of target(), option(), package(), task(), rule(), and their set_xxx/add_xxx calls.

target("app")
    set_kind("binary")
    add_files("src/*.cpp")
    add_defines("DEBUG")
    add_syslinks("pthread")
Installs
9
GitHub Stars
16
First Seen
Apr 15, 2026
xmake-style — xmake-io/xmake-skills