一个 现代C++ 构建工具 -
模块化 + 依赖/工具链管理 + 包索引 + 打包发布
mcpp 使用 C++23 完全模块化的工程结构进行开发, 且已经初步完成自举 (使用工具本身从源码构建出自己). 具备 项目构建、依赖自动处理、工具链管理、构建产物打包导出、模块化包索引等基础功能.
Caution
初步开发中(WIP) — 工具任然处于探索阶段。 接口、命令、行为可能在后续版本调整。问题 / 反馈 / 想法欢迎在 issues 留言。
点击获取xlings安装命令
curl -fsSL https://d2learn.org/xlings-install.sh | bashirm https://d2learn.org/xlings-install.ps1.txt | iextips: xlings -> details
方法一: 使用xlings包管理器进行安装(推荐)
xlings install mcpp -y方法二: 使用一键安装命令
curl -fsSL https://github.com/mcpp-community/mcpp/releases/latest/download/install.sh | bash注: 会装到 ~/.mcpp/,自动加进 shell PATH。删除 ~/.mcpp 即可卸载。
mcpp new hello
cd hello
mcpp build
mcpp run注: 初次构建需要初始化环境并获取工具链, 可能需要一些时间
任意命令的完整选项可通过 mcpp <cmd> --help 查阅。
OS × 工具链矩阵:
| OS / arch | gcc (glibc) | gcc (musl) | clang / llvm | msvc |
|---|---|---|---|---|
| Linux x86_64 | ✅ | ✅ 默认 | 🔄 | — |
| Linux aarch64 | 🔄 | 🔄 | 🔄 | — |
| macOS x86_64 | — | — | 🔄 | — |
| macOS aarch64 | — | — | 🔄 | — |
| Windows x86_64 | — | — | 🔄 | 🔄 |
图例:✅ 已支持 | 🔄 计划中
默认:v0.0.1 release 二进制走 musl 全静态路径,Linux x86_64 可以直接运行。
- 社区论坛 - 交流群(Q: 1067245099)
- mcpp-index — 默认包索引
- mcpplibs - 一个"模块化"的现代C++库集合
项目依赖的和部分有灵感启发来源的工具和库
- xlings — 工具链 / 包管理底座
- mcpplibs.cmdline — mcpp 自身用的 CLI 框架
- ninja — a small build system with a focus on speed
- xmake — A cross-platform build utility based on Lua
- cargo — The Rust package manager