{"id":13438573,"url":"https://github.com/xmake-io/xmake","last_synced_at":"2025-05-14T22:06:19.814Z","repository":{"id":30874184,"uuid":"34431834","full_name":"xmake-io/xmake","owner":"xmake-io","description":"🔥 A cross-platform build utility based on Lua","archived":false,"fork":false,"pushed_at":"2025-05-07T14:48:44.000Z","size":38310,"stargazers_count":10937,"open_issues_count":209,"forks_count":838,"subscribers_count":140,"default_branch":"dev","last_synced_at":"2025-05-07T21:58:11.550Z","etag":null,"topics":["build","build-tool","c","c-plus-plus","cmake","cross-toolchains","linux","lua","makefile","objective-c","package-manager","tbox","visual-studio","wdk","xmake"],"latest_commit_sha":null,"homepage":"https://xmake.io","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xmake-io.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"waruqi","open_collective":"xmake","custom":"https://xmake.io/#/sponsor"}},"created_at":"2015-04-23T03:37:31.000Z","updated_at":"2025-05-07T14:48:48.000Z","dependencies_parsed_at":"2024-08-03T11:01:43.279Z","dependency_job_id":"7b3159fe-7278-4943-baf2-e417645c6a78","html_url":"https://github.com/xmake-io/xmake","commit_stats":{"total_commits":13171,"total_committers":203,"mean_commits":64.88177339901478,"dds":"0.15655607015412654","last_synced_commit":"fce49a0940ba7b950d37b5d0ad1217614c6e2bd5"},"previous_names":["tboox/xmake"],"tags_count":79,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmake-io%2Fxmake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmake-io%2Fxmake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmake-io%2Fxmake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmake-io%2Fxmake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xmake-io","download_url":"https://codeload.github.com/xmake-io/xmake/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253457980,"owners_count":21911770,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["build","build-tool","c","c-plus-plus","cmake","cross-toolchains","linux","lua","makefile","objective-c","package-manager","tbox","visual-studio","wdk","xmake"],"created_at":"2024-07-31T03:01:06.554Z","updated_at":"2025-05-14T22:06:14.786Z","avatar_url":"https://github.com/xmake-io.png","language":"Lua","readme":"\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://xmake.io\"\u003e\n    \u003cimg width=\"160\" height=\"160\" src=\"https://tboox.org/static/img/xmake/logo256c.png\"\u003e\n  \u003c/a\u003e\n\n  \u003ch1\u003exmake\u003c/h1\u003e\n\n  \u003cdiv\u003e\n    \u003ca href=\"https://github.com/xmake-io/xmake/actions?query=workflow%3AWindows\"\u003e\n      \u003cimg src=\"https://img.shields.io/github/actions/workflow/status/xmake-io/xmake/windows.yml?branch=master\u0026style=flat-square\u0026logo=windows\" alt=\"github-ci\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/xmake-io/xmake/actions?query=workflow%3ALinux\"\u003e\n      \u003cimg src=\"https://img.shields.io/github/actions/workflow/status/xmake-io/xmake/linux.yml?branch=master\u0026style=flat-square\u0026logo=linux\" alt=\"github-ci\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/xmake-io/xmake/actions?query=workflow%3AmacOS\"\u003e\n      \u003cimg src=\"https://img.shields.io/github/actions/workflow/status/xmake-io/xmake/macos.yml?branch=master\u0026style=flat-square\u0026logo=apple\" alt=\"github-ci\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/xmake-io/xmake/releases\"\u003e\n      \u003cimg src=\"https://img.shields.io/github/release/xmake-io/xmake.svg?style=flat-square\" alt=\"Github All Releases\" /\u003e\n    \u003c/a\u003e\n  \u003c/div\u003e\n  \u003cdiv\u003e\n    \u003ca href=\"https://github.com/xmake-io/xmake/blob/master/LICENSE.md\"\u003e\n      \u003cimg src=\"https://img.shields.io/github/license/xmake-io/xmake.svg?colorB=f48041\u0026style=flat-square\" alt=\"license\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://www.reddit.com/r/xmake/\"\u003e\n      \u003cimg src=\"https://img.shields.io/badge/chat-on%20reddit-ff3f34.svg?style=flat-square\" alt=\"Reddit\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://t.me/tbooxorg\"\u003e\n      \u003cimg src=\"https://img.shields.io/badge/chat-on%20telegram-blue.svg?style=flat-square\" alt=\"Telegram\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://jq.qq.com/?_wv=1027\u0026k=5hpwWFv\"\u003e\n      \u003cimg src=\"https://img.shields.io/badge/chat-on%20QQ-ff69b4.svg?style=flat-square\" alt=\"QQ\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://discord.gg/xmake\"\u003e\n      \u003cimg src=\"https://img.shields.io/badge/chat-on%20discord-7289da.svg?style=flat-square\" alt=\"Discord\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://xmake.io/#/sponsor\"\u003e\n      \u003cimg src=\"https://img.shields.io/badge/donate-us-orange.svg?style=flat-square\" alt=\"Donate\" /\u003e\n    \u003c/a\u003e\n  \u003c/div\u003e\n\n  \u003cb\u003eA cross-platform build utility based on Lua\u003c/b\u003e\u003cbr/\u003e\n  \u003ci\u003eModern C/C++ build tool: Simple, Fast, Powerful dependency package integration\u003c/i\u003e\u003cbr/\u003e\n\u003c/div\u003e\n\n## Support this project\n\nSupport this project by [becoming a sponsor](https://xmake.io/#/about/sponsor). Your logo will show up here with a link to your website. 🙏\n\n\u003ca href=\"https://opencollective.com/xmake#sponsors\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/xmake/sponsors.svg?width=890\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/xmake#backers\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/xmake/backers.svg?width=890\"\u003e\u003c/a\u003e\n\n## Technical support\n\nYou can also consider sponsoring us to get extra technical support services via the [Github sponsor program](https://github.com/sponsors/waruqi). If you do, you can get access to the [xmake-io/technical-support](https://github.com/xmake-io/technical-support) repository, which has the following benefits:\n\n- [X] Handling Issues with higher priority\n- [X] One-to-one technical consulting service\n- [X] Review your xmake.lua and provide suggestions for improvement\n\n## Introduction ([中文](/README_zh.md))\n\nWhat is Xmake?\n\n1. Xmake is a cross-platform build utility based on the Lua scripting language.\n2. Xmake is very lightweight and has no dependencies outside of the standard library.\n3. Uses the `xmake.lua` file to maintain project builds with a simple and readable syntax.\n\nXmake 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.\n\n```\nXmake = Build backend + Project Generator + Package Manager + [Remote|Distributed] Build + Cache\n```\n\nAlthough less precise, one can still understand Xmake in the following way:\n\n```\nXmake ≈ Make/Ninja + CMake/Meson + Vcpkg/Conan + distcc + ccache/sccache\n```\n\nIf you want to know more, please refer to: the [Documentation](https://xmake.io/#/getting_started), [GitHub](https://github.com/xmake-io/xmake) or [Gitee](https://gitee.com/tboox/xmake). You are also welcome to join our [community](https://xmake.io/#/about/contact).\n\nThe official Xmake repository can be found at [xmake-io/xmake-repo](https://github.com/xmake-io/xmake-repo).\n\n![](https://github.com/xmake-io/xmake-docs/raw/master/assets/img/index/xmake-basic-render.gif)\n\n## Installation\n\n### With cURL\n\n```bash\ncurl -fsSL https://xmake.io/shget.text | bash\n```\n\n### With Wget\n\n```bash\nwget https://xmake.io/shget.text -O - | bash\n```\n\n### With PowerShell\n\n```sh\nirm https://xmake.io/psget.text | iex\n```\n\n### Other installation methods\n\nIf you don't want to use the above scripts to install Xmake, visit the [Installation Guide](https://xmake.io/#/guide/installation) for other installation methods (building from source, package managers, etc.).\n\n## Simple Project Description\n\n```lua\ntarget(\"console\")\n    set_kind(\"binary\")\n    add_files(\"src/*.c\")\n```\n\nCreates a new target `console` of kind `binary`, and adds all the files ending in `.c` in the `src` directory.\n\n## Package dependencies\n\n```lua\nadd_requires(\"tbox 1.6.*\", \"zlib\", \"libpng ~1.6\")\n```\n\nAdds a requirement of tbox v1.6, zlib (any version), and libpng v1.6.\n\nThe official xmake package repository exists at: [xmake-repo](https://github.com/xmake-io/xmake-repo)\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://github.com/xmake-io/xmake-docs/raw/master/assets/img/index/package.gif\" width=\"650px\" /\u003e\n\u003c/p\u003e\n\n## Command line interface reference\n\nThe below assumes you are currently in the project's root directory.\n\n### Build a project\n\n```bash\n$ xmake\n```\n\n### Run target\n\n```bash\n$ xmake run console\n```\n\n### Debug target\n\n```bash\n$ xmake run -d console\n```\n\n### Run test\n\n```bash\n$ xmake test\n```\n\n### Configure platform\n\n```bash\n$ xmake f -p [windows|linux|macosx|android|iphoneos ..] -a [x86|arm64 ..] -m [debug|release]\n$ xmake\n```\n\n### Menu configuration\n\n```bash\n$ xmake f --menu\n```\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://xmake.io/assets/img/index/menuconf.png\" width=\"650px\"/\u003e\n\u003c/p\u003e\n\n## Supported platforms\n\n* Windows (x86, x64, arm, arm64, arm64ec)\n* macOS (i386, x86_64, arm64)\n* Linux (i386, x86_64, arm, arm64, riscv, mips, 390x, sh4 ...)\n* *BSD (i386, x86_64)\n* Android (x86, x86_64, armeabi, armeabi-v7a, arm64-v8a)\n* iOS (armv7, armv7s, arm64, i386, x86_64)\n* WatchOS (armv7k, i386)\n* AppleTVOS (armv7, arm64, i386, x86_64)\n* AppleXROS (arm64, x86_64)\n* MSYS (i386, x86_64)\n* MinGW (i386, x86_64, arm, arm64)\n* Cygwin (i386, x86_64)\n* Wasm (wasm32, wasm64)\n* Haiku (i386, x86_64)\n* Harmony (x86_64, armeabi-v7a, arm64-v8a)\n* Cross (cross-toolchains ..)\n\n## Supported toolchains\n\n```bash\n$ xmake show -l toolchains\nxcode         Xcode IDE\nmsvc          Microsoft Visual C/C++ Compiler\nclang-cl      LLVM Clang C/C++ Compiler compatible with msvc\nyasm          The Yasm Modular Assembler\nclang         A C language family frontend for LLVM\ngo            Go Programming Language Compiler\ndlang         D Programming Language Compiler (Auto)\ndmd           D Programming Language Compiler\nldc           The LLVM-based D Compiler\ngdc           The GNU D Compiler (GDC)\ngfortran      GNU Fortran Programming Language Compiler\nzig           Zig Programming Language Compiler\nsdcc          Small Device C Compiler\ncuda          CUDA Toolkit (nvcc, nvc, nvc++, nvfortran)\nndk           Android NDK\nrust          Rust Programming Language Compiler\nswift         Swift Programming Language Compiler\nllvm          A collection of modular and reusable compiler and toolchain technologies\ncross         Common cross compilation toolchain\nnasm          NASM Assembler\ngcc           GNU Compiler Collection\nmingw         Minimalist GNU for Windows\ngnu-rm        GNU Arm Embedded Toolchain\nenvs          Environment variables toolchain\nfasm          Flat Assembler\ntinycc        Tiny C Compiler\nemcc          A toolchain for compiling to asm.js and WebAssembly\nicc           Intel C/C++ Compiler\nifort         Intel Fortran Compiler\nifx           Intel LLVM Fortran Compiler\nmuslcc        The musl-based cross-compilation toolchain\nfpc           Free Pascal Programming Language Compiler\nwasi          WASI-enabled WebAssembly C/C++ toolchain\nnim           Nim Programming Language Compiler\ncircle        A new C++20 compiler\narmcc         ARM Compiler Version 5 of Keil MDK\narmclang      ARM Compiler Version 6 of Keil MDK\nc51           Keil development tools for the 8051 Microcontroller Architecture\nicx           Intel LLVM C/C++ Compiler\ndpcpp         Intel LLVM C++ Compiler for data parallel programming model based on Khronos SYCL\nmasm32        The MASM32 SDK\niverilog      Icarus Verilog\nverilator     Verilator open-source SystemVerilog simulator and lint system\ncosmocc       build-once run-anywhere\nhdk           Harmony SDK\nti-c2000      TI-CGT C2000 compiler\nti-c6000      TI-CGT C6000 compiler\niararm        IAR ARM C/C++ Compiler\nkotlin-native Kotlin Native Programming Language Compiler\n```\n\n## Supported languages\n\n* C and C++\n* Objective-C and Objective-C++\n* Swift\n* Assembly\n* Golang\n* Rust\n* Dlang\n* Fortran\n* Cuda\n* Zig\n* Vala\n* Pascal\n* Nim\n* Verilog\n* FASM\n* NASM\n* YASM\n* MASM32\n* Cppfront\n* Kotlin\n\n## Features\n\nXmake exhibits:\n\n* Simple yet flexible configuration grammar.\n* Quick, dependency-free installation.\n* Easy compilation for most all supported platforms.\n* Supports cross-compilation with intelligent analysis of cross toolchain information.\n* Extremely fast parallel compilation support.\n* Supports C++ modules (new in C++20).\n* Supports cross-platform C/C++ dependencies with built-in package manager.\n* Multi-language compilation support including mixed-language projects.\n* Rich plug-in support with various project generators (ex. Visual Studio/Makefiles/CMake/`compile_commands.json`)\n* REPL interactive execution support\n* Incremental compilation support with automatic analysis of header files\n* Built-in toolchain management\n* A large number of expansion modules\n* Remote compilation support\n* Distributed compilation support\n* Local and remote build cache support\n\n## Supported Project Types\n\nXmake supports the below types of projects:\n\n* Static libraries\n* Shared libraries\n* Console/CLI applications\n* CUDA programs\n* Qt applications\n* WDK drivers (umdf/kmdf/wdm)\n* WinSDK applications\n* MFC applications\n* Darwin applications (with metal support)\n* Frameworks and bundles (in Darwin)\n* SWIG modules (Lua, Python, ...)\n* LuaRocks modules\n* Protobuf programs\n* Lex/Yacc programs\n* Linux kernel modules\n\n## Package management\n\n### Download and build\n\nXmake can automatically fetch and install dependencies!\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://xmake.io/assets/img/index/package_manage.png\" width=\"650px\" /\u003e\n\u003c/p\u003e\n\n### Supported package repositories\n\n* Official package repository [xmake-repo](https://github.com/xmake-io/xmake-repo) (tbox \u003e1.6.1)\n* Official package manager [Xrepo](https://github.com/xmake-io/xrepo)\n* [User-built repositories](https://xmake.io/#/package/remote_package?id=using-self-built-private-package-repository)\n* Conan (conan::openssl/1.1.1g)\n* Conda (conda::libpng 1.3.67)\n* Vcpkg (vcpkg:ffmpeg)\n* Homebrew/Linuxbrew (brew::pcre2/libpcre2-8)\n* Pacman on archlinux/msys2 (pacman::libcurl)\n* Apt on ubuntu/debian (apt::zlib1g-dev)\n* Clib (clib::clibs/bytes@0.0.4)\n* Dub (dub::log 0.4.3)\n* Portage on Gentoo/Linux (portage::libhandy)\n* Nimble for nimlang (nimble::zip \u003e1.3)\n* Cargo for rust (cargo::base64 0.13.0)\n* Zypper on openSUSE (zypper::libsfml2 2.5)\n\n### Package management features\n\n* The official repository provides nearly 500+ packages with simple compilation on all supported platforms\n* Full platform package support, support for cross-compiled dependent packages\n* Support package virtual environment using `xrepo env shell`\n* Precompiled package acceleration for Windows (NT)\n* Support self-built package repositories and private repository deployment\n* Third-party package repository support for repositories such as: vcpkg, conan, conda, etc.\n* Supports automatic pulling of remote toolchains\n* Supports dependency version locking\n\n## Processing architecture\n\nBelow is a diagram showing roughly the architecture of Xmake, and thus how it functions.\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://xmake.io/assets/img/index/package_arch.png\" width=\"650px\" /\u003e\n\u003c/p\u003e\n\n## Distributed Compilation\n\n- [X] Cross-platform support.\n- [X] Support for MSVC, Clang, GCC and other cross-compilation toolchains.\n- [X] Support for building for Android, Linux, Windows NT, and Darwin hosts.\n- [X] No dependencies other than the compilation toolchain.\n- [X] Support for build server load balancing scheduling.\n- [X] Support for real time compressed transfer of large files (lz4).\n- [X] Almost zero configuration cost, no shared filesystem required, for convenience and security.\n\nFor more details see: [#274](https://github.com/xmake-io/xmake/issues/274)\n\n## Remote Compilation\n\nFor more details see: [#622](https://github.com/xmake-io/xmake/issues/622)\n\n## Local/Remote Build Cache\n\nFor more details see: [#622](https://github.com/xmake-io/xmake/issues/2371)\n\n## Benchmark\n\nXmake's speed on is par with Ninja! The test project: [xmake-core](https://github.com/xmake-io/xmake/tree/master/core)\n\n### Multi-task parallel compilation\n\n\n| buildsystem      | Termux (8core/-j12) | buildsystem      | MacOS (8core/-j12) |\n| ------------------ | --------------------- | ------------------ | -------------------- |\n| xmake            | 24.890s             | xmake            | 12.264s            |\n| ninja            | 25.682s             | ninja            | 11.327s            |\n| cmake(gen+make)  | 5.416s+28.473s      | cmake(gen+make)  | 1.203s+14.030s     |\n| cmake(gen+ninja) | 4.458s+24.842s      | cmake(gen+ninja) | 0.988s+11.644s     |\n\n## Single task compilation\n\n\n| buildsystem      | Termux (-j1)     | buildsystem      | MacOS (-j1)    |\n| ------------------ | ------------------ | ------------------ | ---------------- |\n| xmake            | 1m57.707s        | xmake            | 39.937s        |\n| ninja            | 1m52.845s        | ninja            | 38.995s        |\n| cmake(gen+make)  | 5.416s+2m10.539s | cmake(gen+make)  | 1.203s+41.737s |\n| cmake(gen+ninja) | 4.458s+1m54.868s | cmake(gen+ninja) | 0.988s+38.022s |\n\n## More Examples\n\n### Debug and release profiles\n\n```lua\nadd_rules(\"mode.debug\", \"mode.release\")\n\ntarget(\"console\")\n    set_kind(\"binary\")\n    add_files(\"src/*.c\")\n    if is_mode(\"debug\") then\n        add_defines(\"DEBUG\")\n    end\n```\n\n### Custom scripts\n\n```lua\ntarget(\"test\")\n    set_kind(\"binary\")\n    add_files(\"src/*.c\")\n    after_build(function (target)\n        print(\"hello: %s\", target:name())\n        os.exec(\"echo %s\", target:targetfile())\n    end)\n```\n\n### Automatic integration of dependent packages\n\nDownload and use packages in [xmake-repo](https://github.com/xmake-io/xmake-repo) or third-party repositories:\n\n```lua\nadd_requires(\"tbox \u003e1.6.1\", \"libuv master\", \"vcpkg::ffmpeg\", \"brew::pcre2/libpcre2-8\")\nadd_requires(\"conan::openssl/1.1.1g\", {alias = \"openssl\", optional = true, debug = true})\ntarget(\"test\")\n    set_kind(\"binary\")\n    add_files(\"src/*.c\")\n    add_packages(\"tbox\", \"libuv\", \"vcpkg::ffmpeg\", \"brew::pcre2/libpcre2-8\", \"openssl\")\n```\n\nIn addition, we can also use the [xrepo](https://github.com/xmake-io/xrepo) command to quickly install dependencies.\n\n### Qt QuickApp Program\n\n```lua\ntarget(\"test\")\n    add_rules(\"qt.quickapp\")\n    add_files(\"src/*.cpp\")\n    add_files(\"src/qml.qrc\")\n```\n\n### Cuda Program\n\n```lua\ntarget(\"test\")\n    set_kind(\"binary\")\n    add_files(\"src/*.cu\")\n    add_cugencodes(\"native\")\n    add_cugencodes(\"compute_35\")\n```\n\n### WDK/UMDF Driver Program\n\n```lua\ntarget(\"echo\")\n    add_rules(\"wdk.driver\", \"wdk.env.umdf\")\n    add_files(\"driver/*.c\")\n    add_files(\"driver/*.inx\")\n    add_includedirs(\"exe\")\n\ntarget(\"app\")\n    add_rules(\"wdk.binary\", \"wdk.env.umdf\")\n    add_files(\"exe/*.cpp\")\n```\n\nFor more WDK driver examples (UMDF/KMDF/WDM), please visit [WDK Program Examples](https://xmake.io/#/guide/project_examples?id=wdk-driver-program)\n\n### Darwin Applications\n\n```lua\ntarget(\"test\")\n    add_rules(\"xcode.application\")\n    add_files(\"src/*.m\", \"src/**.storyboard\", \"src/*.xcassets\")\n    add_files(\"src/Info.plist\")\n```\n\n### Framework and Bundle Program (Darwin)\n\n```lua\ntarget(\"test\")\n    add_rules(\"xcode.framework\") -- or xcode.bundle\n    add_files(\"src/*.m\")\n    add_files(\"src/Info.plist\")\n```\n\n### OpenMP Program\n\n```lua\nadd_requires(\"libomp\", {optional = true})\ntarget(\"loop\")\n    set_kind(\"binary\")\n    add_files(\"src/*.cpp\")\n    add_rules(\"c++.openmp\")\n    add_packages(\"libomp\")\n```\n\n### Zig Program\n\n```lua\ntarget(\"test\")\n    set_kind(\"binary\")\n    add_files(\"src/main.zig\")\n```\n\n### Automatically fetch remote toolchain\n\n#### fetch a special version of LLVM\n\nRequire the Clang version packaged with LLM-10 to compile a project.\n\n```lua\nadd_requires(\"llvm 10.x\", {alias = \"llvm-10\"})\ntarget(\"test\")\n    set_kind(\"binary\")\n    add_files(\"src/*.c\")\n    set_toolchains(\"llvm@llvm-10\")\n```\n\n#### Fetch a cross-compilation toolchain\n\nWe can also pull a specified cross-compilation toolchain in to compile the project.\n\n```lua\nadd_requires(\"muslcc\")\ntarget(\"test\")\n    set_kind(\"binary\")\n    add_files(\"src/*.c\")\n    set_toolchains(\"@muslcc\")\n```\n\n#### Fetch toolchain and packages\n\nWe can also use the specified `muslcc` cross-compilation toolchain to compile and integrate all dependent packages.\n\n```lua\nadd_requires(\"muslcc\")\nadd_requires(\"zlib\", \"libogg\", {system = false})\n\nset_toolchains(\"@muslcc\")\n\ntarget(\"test\")\n    set_kind(\"binary\")\n    add_files(\"src/*.c\")\n    add_packages(\"zlib\", \"libogg\")\n```\n\n## Plugins\n\n#### Generate IDE project file plugin（makefile, vs2002 - vs2022 .. ）\n\n```bash\n$ xmake project -k vsxmake -m \"debug,release\" # New vsproj generator (Recommended)\n$ xmake project -k vs -m \"debug,release\"\n$ xmake project -k cmake\n$ xmake project -k ninja\n$ xmake project -k compile_commands\n```\n\n#### Run a custom lua script plugin\n\n```bash\n$ xmake l ./test.lua\n$ xmake l -c \"print('hello xmake!')\"\n$ xmake l lib.detect.find_tool gcc\n$ xmake l\n\u003e print(\"hello xmake!\")\n\u003e {1, 2, 3}\n\u003c {\n    1,\n    2,\n    3\n  }\n```\n\nTo see a list of bultin plugs, please visit [Builtin plugins](https://xmake.io/#/plugin/builtin_plugins).\n\nPlease download and install other plugins from the plugins repository [xmake-plugins](https://github.com/xmake-io/xmake-plugins).\n\n## IDE/Editor Integration\n\n* [xmake-vscode](https://github.com/xmake-io/xmake-vscode)\n\n\u003cimg src=\"https://raw.githubusercontent.com/xmake-io/xmake-vscode/master/res/problem.gif\" width=\"650px\" /\u003e\n\n* [xmake-sublime](https://github.com/xmake-io/xmake-sublime)\n\n\u003cimg src=\"https://raw.githubusercontent.com/xmake-io/xmake-sublime/master/res/problem.gif\" width=\"650px\" /\u003e\n\n* [xmake-idea](https://github.com/xmake-io/xmake-idea)\n\n\u003cimg src=\"https://raw.githubusercontent.com/xmake-io/xmake-idea/master/res/problem.gif\" width=\"650px\" /\u003e\n\n* [xmake.vim](https://github.com/luzhlon/xmake.vim) (third-party, thanks [@luzhlon](https://github.com/luzhlon))\n* [xmake-visualstudio](https://github.com/HelloWorld886/xmake-visualstudio) (third-party, thanks [@HelloWorld886](https://github.com/HelloWorld886))\n* [xmake-qtcreator](https://github.com/Arthapz/xmake-project-manager) (third-party, thanks [@Arthapz](https://github.com/Arthapz))\n\n### Xmake Gradle Plugin (JNI)\n\nWe can use the [xmake-gradle](https://github.com/xmake-io/xmake-gradle) plugin to compile JNI libraries via gradle.\n\n```\nplugins {\n  id 'org.tboox.gradle-xmake-plugin' version '1.1.5'\n}\n\nandroid {\n    externalNativeBuild {\n        xmake {\n            path \"jni/xmake.lua\"\n        }\n    }\n}\n```\n\nThe `xmakeBuild` task will be injected into the `assemble` task automatically if the `gradle-xmake-plugin` has been applied.\n\n```console\n$ ./gradlew app:assembleDebug\n\u003e Task :nativelib:xmakeConfigureForArm64\n\u003e Task :nativelib:xmakeBuildForArm64\n\u003e\u003e xmake build\n[ 50%]: cache compiling.debug nativelib.cc\n[ 75%]: linking.debug libnativelib.so\n[100%]: build ok!\n\u003e\u003e install artifacts to /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/arm64-v8a\n\u003e Task :nativelib:xmakeConfigureForArmv7\n\u003e Task :nativelib:xmakeBuildForArmv7\n\u003e\u003e xmake build\n[ 50%]: cache compiling.debug nativelib.cc\n[ 75%]: linking.debug libnativelib.so\n[100%]: build ok!\n\u003e\u003e install artifacts to /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/armeabi-v7a\n\u003e Task :nativelib:preBuild\n\u003e Task :nativelib:assemble\n\u003e Task :app:assembleDebug\n```\n\n## CI Integration\n\n### GitHub Action\n\nThe [github-action-setup-xmake](https://github.com/xmake-io/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.\n\n```yaml\nuses: xmake-io/github-action-setup-xmake@v1\nwith:\n  xmake-version: latest\n```\n\n## Who is using Xmake?\n\nThe list of people and projects who are using Xmake is available [here](https://xmake.io/#/about/who_is_using_xmake).\n\nIf 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.  Ihis also let users to use xmake more confidently and give us motivation to continue to maintain it.\n\nThis will help the Xmake project and it's community grow stronger and expand!\n\n## Contacts\n\n* Email：[waruqi@gmail.com](mailto:waruqi@gmail.com)\n* Homepage：[xmake.io](https://xmake.io)\n* Community\n  - [Chat on Reddit](https://www.reddit.com/r/xmake/)\n  - [Chat on Telegram](https://t.me/tbooxorg)\n  - [Chat on Discord](https://discord.gg/xmake)\n  - Chat on QQ Group: 343118190, 662147501\n* Source Code：[GitHub](https://github.com/xmake-io/xmake), [Gitee](https://gitee.com/tboox/xmake)\n* WeChat Public: tboox-os\n\n## Thanks\n\nThis project exists thanks to all the people who have [contributed](CONTRIBUTING.md):\n\u003ca href=\"https://github.com/xmake-io/xmake/graphs/contributors\"\u003e\u003cimg src=\"https://opencollective.com/xmake/contributors.svg?width=890\u0026button=false\" /\u003e\u003c/a\u003e\n\n* [TitanSnow](https://github.com/TitanSnow): Provide the xmake [logo](https://github.com/TitanSnow/ts-xmake-logo) and install scripts\n* [uael](https://github.com/uael): Provide the semantic versioning library [sv](https://github.com/uael/sv)\n* [OpportunityLiu](https://github.com/OpportunityLiu): Improve cuda, tests and ci\n* [xq144](https://github.com/xq114): Improve `xrepo env shell`, and contribute a lot of packages to the [xmake-repo](https://github.com/xmake-io/xmake-repo) repository.\n* [star-hengxing](https://github.com/star-hengxing): Contribute a lot of packages to the [xmake-repo](https://github.com/xmake-io/xmake-repo) repository.\n* [Arthapz](https://github.com/Arthapz): Contribue new C++ Modules implementation.\n* [SirLynix](https://github.com/SirLynix): Contributed many packages and let more people know about xmake.\n* `enderger`: Helped smooth out the edges on the English translation of the README\n","funding_links":["https://github.com/sponsors/waruqi","https://opencollective.com/xmake","https://xmake.io/#/sponsor"],"categories":["C","HarmonyOS","Lua","LUA","Desktop App Development","Development Tools","C (286)","C/C++ 程序设计","c-plus-plus"],"sub_categories":["Windows Manager","Data Management","网络服务_其他"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxmake-io%2Fxmake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxmake-io%2Fxmake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxmake-io%2Fxmake/lists"}