بنقرة واحدة
xlings-build
构建 xlings 项目的三平台操作指南,覆盖 Linux、macOS、Windows 上的工具链准备、`mcpp` 构建、release 脚本和构建后验证。
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
构建 xlings 项目的三平台操作指南,覆盖 Linux、macOS、Windows 上的工具链准备、`mcpp` 构建、release 脚本和构建后验证。
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
为 mcpp 项目应用 Modern/Module C++ (C++23) 编码风格。适用于编写或审查带模块的 C++ 代码、命名标识符、组织 .cppm/.cpp 文件,或用户提及 mcpp、module C++、现代 C++ 风格时。
xlings 项目贡献规范流程 — 从 issue 到 PR 合入的完整 agent 开发工作流。Use when implementing features, fixing bugs, or contributing code to xlings. Covers environment setup, branching, coding, testing, PR creation, and CI verification.
xlings 项目文档编写规范 — 面向人的 docs/ 目录文档应遵循的风格、格式和组织约定。Use when creating or modifying documents in the docs/ directory.
xlings 包管理器完整使用指南 — 安装、多版本管理、SubOS 隔离环境、项目模式、Agent 集成、包索引生态。Use when tasks involve xlings install/use/search/remove flows, subos lifecycle (new/use/fork/stop/remove), project-mode .xlings.json setup, agent sandbox workflows, or custom index/resource-server configuration.
使用 xlings (XLINGS Quickstart) 进行工具安装、版本管理、包索引扩展和 subos 环境隔离的操作指南。When tasks involve `xlings`/`xim` package install-search-update-remove flows, namespace package handling, self-hosted/custom index repo setup, or multi-version/subos troubleshooting, use this skill.
| name | xlings-build |
| description | 构建 xlings 项目的三平台操作指南,覆盖 Linux、macOS、Windows 上的工具链准备、`mcpp` 构建、release 脚本和构建后验证。 |
Use this skill as the build source of truth for xlings. Prefer repository CI and release scripts over ad-hoc command invention.
This repo has two build products:
mcppxvm / xvm-shim via cargoPrefer the platform release scripts for final packaging:
tools/linux_release.shtools/macos_release.shtools/windows_release.ps1Follow this order unless the user explicitly wants only one phase:
xlings first so .xlings.json can provide mcpp.mcpp.toml and the selected target.-h.xlings install d2x -y when the environment allows network access.Use this path when building the static Linux binary with musl-gcc@15.1.0.
curl -fsSL https://raw.githubusercontent.com/openxlings/xlings/refs/heads/main/tools/other/quick_install.sh | bash
source ~/.bashrc
xlings install musl-gcc@15.1.0 -y
xlings info musl-gcc
Current repo CI and release scripts use this SDK root:
MUSL_SDK="${XLINGS_HOME:-$HOME/.xlings}/data/xpkgs/musl-gcc/15.1.0"
export CC=x86_64-linux-musl-gcc
export CXX=x86_64-linux-musl-g++
export PATH="$MUSL_SDK/bin:$PATH"
If the toolchain cannot run because of a missing musl loader path, create the loader symlink used by this repo:
sudo mkdir -p /home/xlings/.xlings_data/lib
sudo chown "$(id -u):$(id -g)" /home/xlings/.xlings_data/lib
ln -sfn "$MUSL_SDK/x86_64-linux-musl/lib/libc.so" /home/xlings/.xlings_data/lib/ld-musl-x86_64.so.1
mcpp.toml declares the musl target and toolchain.
Quick local build:
mcpp build --target x86_64-linux-musl
cargo build --manifest-path core/xvm/Cargo.toml --release
Release-package build aligned with CI:
chmod +x ./tools/linux_release.sh
SKIP_NETWORK_VERIFY=1 ./tools/linux_release.sh
./build/linux/x86_64/release/xlings -h
./build/linux/x86_64/release/xlings install d2x -y
If using the packaged release tree, prefer ./bin/xlings -h inside the assembled output directory.
The checked-in CI uses the toolchain declared by mcpp.toml and builds the C++ project with mcpp. Installing xlings first only provides the project-declared development tools; xlings does not implicitly install xmake.
curl -fsSL https://raw.githubusercontent.com/openxlings/xlings/refs/heads/main/tools/other/quick_install.sh | bash
source ~/.bashrc
CI-aligned toolchain:
xlings install
Then build with the toolchain declared by mcpp.toml:
mcpp build
Quick local build:
mcpp build
cargo build --manifest-path core/xvm/Cargo.toml --release
Release-package build aligned with CI:
chmod +x ./tools/macos_release.sh
SKIP_NETWORK_VERIFY=1 ./tools/macos_release.sh
./build/macosx/arm64/release/xlings -h
./build/macosx/arm64/release/xlings install d2x -y
Also keep the release-script expectation in mind: the final binary should not retain LLVM dylib runtime dependency.
Use the LLVM toolchain declared by mcpp.toml, matching Windows CI.
Install xlings/mcpp and ensure Rust is available.
Optional: install xlings as a runtime/package-manager smoke-test target after build.
Quick local build:
mcpp build
cargo build --manifest-path core/xvm/Cargo.toml --release
Release-package build aligned with CI:
pwsh ./tools/windows_release.ps1
.\build\windows\x64\release\xlings.exe -h
.\build\windows\x64\release\xlings.exe install d2x -y
After any successful build, run at least:
xlings -h
xlings config
xvm --version
When testing package-manager behavior, also run:
xlings install d2x -y
If network access is not available, say that the smoke test was skipped rather than claiming success.
musl-gcc@15.1.0 is required for import std in the C++23 build.mcpp.toml is the only C++ project definition.xvm, config files, package-index data, and post-build verification. The release does not bundle xmake as an internal runtime dependency.