# 使用 Homebrew, apk, apt, dnf, MacPorts, Nix, pacman, scoop, winget 安装 xmake

查看 xmake 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:xmake
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install xmake
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install xmake
```

  证据: MacPorts ports tree: devel/xmake/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add xmake
```

  证据: Alpine Linux edge package indexes: xmake from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install xmake
```

  证据: Debian stable package indexes: xmake from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install xmake
```

  证据: Fedora Rawhide package metadata: xmake from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#xmake
```

  证据: nixpkgs package indexes: pkgs/by-name/xm/xmake/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S xmake
```

  证据: Arch Linux sync databases: xmake from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

### Windows

- Scoop (92%):

```sh
scoop install main/xmake
```

  证据: Scoop official bucket manifest trees: bucket/xmake.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

- winget (92%):

```sh
winget install --id Xmake-io.Xmake -e
```

  证据: Windows Package Manager source index: Xmake-io.Xmake from https://cdn.winget.microsoft.com/cache/source.msix

## 软件包事实

- **软件包键:** brew:xmake
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/xmake>
- **版本:** 3.0.9
- **来源摘要:** Cross-platform build utility based on Lua
- **主页:** <https://xmake.io/>
- **仓库:** <https://github.com/xmake-io/xmake>
- **上游文档:** <https://xmake.io/>
- **许可证:** Apache-2.0
- **源码归档:** <https://github.com/xmake-io/xmake/releases/download/v3.0.9/xmake-v3.0.9.tar.gz>
- **最后更新:** 2026-05-19T04:49:58Z
- **已生成:** 2026-07-08T07:18:31+00:00

## 可执行文件

- xmake (cli)
- xrepo (cli)
- xmake (别名)
- xrepo (别名)

## macOS 提供的库

- ncurses

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-07-08
- 管理器版本: 3.0.9
- 管理器更新时间: 2026-05-19
- 本地数据: OK
- 上游仓库: https://github.com/xmake-io/xmake
- 信息: No cached GitHub release or tag data was available.
## 项目历史与用法

Xmake is a Lua-based cross-platform build utility for C, C++, and other compiled-language projects. Its distinctive package-nerd angle is that it combines build backend, project generator, package manager, remote/distributed build support, and cache features behind one `xmake.lua` project file.

### 项目历史

The GitHub repository was created on 2015-04-23. Xmake's own introduction describes it as a lightweight, cross-platform build utility based on Lua, driven by a dependency-free C core, with concise project configuration compared with Makefiles or CMake.

The project grew from a build tool into a combined build-and-dependency environment. The README frames Xmake as build backend plus project generator plus package manager, with analogies to Make/Ninja, CMake/Meson, Vcpkg/Conan, distcc, and ccache/sccache. That positioning explains why the `xmake` executable is paired with `xrepo` for package work.

The official xmake-repo package repository was created on 2017-04-09. The package guide says official package use was initially supported after version 2.2.2, with `add_requires()` naming third-party packages and `add_packages()` applying them to targets.

By the 3.0 series, Xmake had accumulated a broad platform and toolchain matrix. The README lists desktop, BSD, mobile, embedded, WebAssembly, and cross-compilation platforms, plus toolchains ranging from GCC, Clang, MSVC, Xcode, Android NDK, Zig, Rust, Swift, CUDA, Fortran, Verilator, WebAssembly, and vendor embedded compilers.

### 采用历史

Xmake adoption has been community-led rather than standards-body driven. The official "Who is using Xmake?" page lists game modding, embedded, graphics, aerospace, data-structure, full-body tracking, real-time communication, and commercial/internal users, plus notable entries such as Epic Games Zen and Microsoft Research's CHERIoT RTOS.

For package users, adoption was helped by Xmake's dual role: installing the tool is enough to try simple builds, while the official package repository lets projects express third-party C/C++ package needs inside the same Lua build description.

### 使用方式

A minimal project defines targets in `xmake.lua`, for example setting a target kind and adding source globs. Common commands are `xmake` to build, `xmake run` to execute a target, `xmake test` for tests, and `xmake f` or `xmake config` to set platform, architecture, and build mode.

Dependency use centers on `add_requires()` and `add_packages()`: Xmake can check system libraries, fetch matching source packages, build and install them into its own package area, then link them into the project. The package guide also documents semantic version constraints, optional packages, debug package builds, custom package configs, and private/project package repositories.

Xmake is especially practical for cross-platform C/C++ projects that want build logic, third-party package integration, IDE/project generation, and cross-compilation switches in one tool without writing separate CMake and shell glue layers.

### 为什么软件包爱好者会关心

Xmake is significant because it collapses several packaging-adjacent jobs into one executable: project description, build orchestration, dependency acquisition, toolchain selection, package repository rules, and generated project files. That makes it a useful comparison point against CMake plus vcpkg/conan or Meson plus external dependency managers.

Its package repository is also a distribution model in miniature: recipes are versioned in a central GitHub repo, selected semantically by project files, and built per platform/architecture into an isolated install area. For package nerds, that is the interesting part, not just the Lua syntax.

### 时间线

- 2015-04-23: xmake GitHub repository created.
- 2017-04-09: xmake-repo, the official package repository, created.
- 2018-10-16: xmake v2.2.2 released; official package-management documentation says package use was initially supported after this version.
- 2025-06-15: xmake v3.0.0 released, switching to 3.0 policies and changing build/run defaults.
- 2026-05-19: xmake v3.0.9 released with new toolchain, package, and graph/export features.

### Related projects

- Related tools include Make, Ninja, CMake, Meson, Vcpkg, Conan, distcc, ccache, sccache, and the official xmake-repo package repository. Xmake also overlaps with IDE/project generators because it can generate project files for other build environments.

### 来源

- <https://api.github.com/repos/xmake-io/xmake>
- <https://api.github.com/repos/xmake-io/xmake-repo>
- <https://api.github.com/repos/xmake-io/xmake/releases/tags/v2.2.2>
- <https://api.github.com/repos/xmake-io/xmake/releases/tags/v3.0.0>
- <https://api.github.com/repos/xmake-io/xmake/releases?per_page=12>
- <https://github.com/xmake-io/xmake>
- <https://raw.githubusercontent.com/xmake-io/xmake-docs/master/docs/about/who_is_using_xmake.md>
- <https://raw.githubusercontent.com/xmake-io/xmake-docs/master/docs/guide/introduction.md>
- <https://raw.githubusercontent.com/xmake-io/xmake-docs/master/docs/guide/package-management/using-official-packages.md>
- <https://raw.githubusercontent.com/xmake-io/xmake/master/CHANGELOG.md>
- <https://raw.githubusercontent.com/xmake-io/xmake/master/README.md>


## 安全说明

没有找到 xmake 的匹配本地密钥处理 manifest。Nucleus 软件包元数据仍在此发布，以便未来覆盖拥有稳定的软件包 URL。



## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: xmake.lua
- Windows: xmake.lua
## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** xmake
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## 其他软件包管理器记录

- Debian apt - xmake - 2.9.9+ds-1: normalized package name match | Debian stable package indexes: xmake from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | cross-platform build utility based on Lua | https://xmake.io
- Debian apt - xmake-data - 2.9.9+ds-1: normalized package name match | Debian stable package indexes: xmake-data from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Data for xmake | https://xmake.io
- Nix - xmake: normalized package name match | nixpkgs package indexes: pkgs/by-name/xm/xmake/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - xmake - 2.8.7+ds-1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: xmake from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | cross-platform build utility based on Lua | http://xmake.io
- Ubuntu apt - xmake-data - 2.8.7+ds-1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: xmake-data from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Data for xmake | http://xmake.io
- apk - xmake - 3.0.9-r0: normalized package name match | Alpine Linux edge package indexes: xmake from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | A cross-platform build utility based on Lua | https://xmake.io/
- apk - xmake-bash-completion - 3.0.9-r0: normalized package name match | Alpine Linux edge package indexes: xmake-bash-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Bash completions for xmake | https://xmake.io/
- apk - xmake-doc - 3.0.9-r0: normalized package name match | Alpine Linux edge package indexes: xmake-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | A cross-platform build utility based on Lua (documentation) | https://xmake.io/
- apk - xmake-fish-completion - 3.0.9-r0: normalized package name match | Alpine Linux edge package indexes: xmake-fish-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Fish completions for xmake | https://xmake.io/
- apk - xmake-zsh-completion - 3.0.9-r0: normalized package name match | Alpine Linux edge package indexes: xmake-zsh-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Zsh completions for xmake | https://xmake.io/
- dnf - xmake - 3.0.9-2.fc45: normalized package name match | Fedora Rawhide package metadata: xmake from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | A cross-platform build utility based on Lua | https://xmake.io
- dnf - xmake-data - 3.0.9-2.fc45: normalized package name match | Fedora Rawhide package metadata: xmake-data from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Common data-files for xmake | https://xmake.io
- pacman - xmake - 3.0.9-1: normalized package name match | Arch Linux sync databases: xmake from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | A cross-platform build utility based on Lua | https://github.com/xmake-io/xmake
- MacPorts - xmake: normalized package name match | MacPorts ports tree: devel/xmake/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Scoop - main/xmake: normalized package name match | Scoop official bucket manifest trees: bucket/xmake.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- winget - Xmake-io.Xmake: normalized package name match | Windows Package Manager source index: Xmake-io.Xmake from https://cdn.winget.microsoft.com/cache/source.msix


## 相关链接

- [Terminal utility packages](https://www.automicvault.com/zh-hans/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/zh-hans/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/zh-hans/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/zh-hans/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [build2](https://www.automicvault.com/zh-hans/pkg/brew/build2/) - Shares av.db curated category or tags: build-system, build-systems, c, cli, developer-tools.
- [buildkit](https://www.automicvault.com/zh-hans/pkg/brew/buildkit/) - Shares av.db curated category or tags: build-system, build-systems, cli, developer-tools.
- [meson](https://www.automicvault.com/zh-hans/pkg/brew/meson/) - Shares av.db curated category or tags: build-system, build-systems, cli, developer-tools.
- [abi-dumper](https://www.automicvault.com/zh-hans/pkg/brew/abi-dumper/) - Shares av.db curated category or tags: c, cli, cpp, developer-tools.
- [bam](https://www.automicvault.com/zh-hans/pkg/brew/bam/) - Shares av.db curated category or tags: build-system, cli, developer-tools, lua.
- [bcpp](https://www.automicvault.com/zh-hans/pkg/brew/bcpp/) - Shares av.db curated category or tags: c, cli, cpp, developer-tools.
- [buildkitd](https://www.automicvault.com/zh-hans/pkg/brew/buildkitd/) - Shares av.db curated category or tags: build-systems, cli, developer-tools.
- [cabin](https://www.automicvault.com/zh-hans/pkg/brew/cabin/) - Shares av.db curated category or tags: build-system, cli, cpp, developer-tools.
- [premake](https://www.automicvault.com/zh-hans/pkg/brew/premake/) - Both packages touch the same language runtime or ecosystem. Shared terms: based, build, build-system, cli, cross.

## Combined YAML source

View the package source record on GitHub. [combined/xmake.yml](https://github.com/automic-vault/db/blob/main/combined/xmake.yml)


## 来源

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
