Skip to content

Commit 3d61319

Browse files
committed
docs: the highlights separate a capability from what it is used for, and the analogy moves to Why mcpp
The highlights had been a flat list in which "native C++23 module support" (a capability) sat beside "works out of the box" and "one flag changes the target" (two things a capability is used for), so a reader could not tell which claims were parts of the tool and which were consequences of them. They are now two columns, and the five rows are the same five parts the analogy names, in the same order, so the two tables read as one statement. The analogy is two rows rather than three. The middle row restated mcpp's implementation for each column, which the left column of the highlights already carries; what the analogy is for is placing the tool against something the reader already uses, and that needs the header and one row. It now sits in Why mcpp, where the question it answers is asked. The four bullets it replaces there each said something the highlights table now says. The P1689 detail they carried is in the build-system group of the feature overview, and the mcpplibs link appears twice further down.
1 parent 1d51c18 commit 3d61319

2 files changed

Lines changed: 36 additions & 36 deletions

File tree

README.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,31 +18,31 @@
1818
<img src="https://github.com/user-attachments/assets/6c85896e-9a37-4f62-acfb-d37a4eae2363" alt="mcpp demo" width="720">
1919
</p>
2020

21-
C++ normally spreads these five jobs across five tools. mcpp is one command for
22-
all five — the second row names what each column is usually recognised as.
21+
## Highlights
2322

24-
| | build system | build plugins | package manager | toolchain manager | environment and runtime |
25-
|---|---|---|---|---|---|
26-
| **mcpp** | module-first C++ on a ninja backend | `build.mcpp` and rule packages | SemVer, a lockfile, package indices | `family@version`, installed on demand | xlings — a user-space environment in an isolated sandbox |
27-
| **closest to** | CMake + Ninja | CMake modules, xmake rules | vcpkg, Conan | rustup, nvm | conda, Nix |
23+
The left column is what mcpp is; the right is what that is used for.
2824

29-
## Highlights
25+
| Capability | What it is used for |
26+
|---|---|
27+
| **Build system** — native C++23 modules, `import std` handled automatically, file-level incremental builds, automatic dependency analysis | `mcpp new && mcpp build`, with nothing to configure; an interface that did not change does not cascade into the units importing it |
28+
| **Build plugins**`build.mcpp` and rule packages | a step mcpp has no rule for is written once and packaged for other projects; CUDA, HIP, SYCL, Vulkan/SPIR-V and Ascend C are each a rule package |
29+
| **Package manager** — SemVer constraints, a lockfile, a cross-project BMI cache, custom indices | two lines of manifest bring in a community module library to `import`; several packages share one lockfile in a workspace |
30+
| **Toolchain manager**`family@version`, installed on demand | no compiler has to be installed first; `--target` moves the same build to Windows, macOS, Cortex-M or RISC-V bare metal |
31+
| **Environment and runtime** — the user-space environment xlings provides | toolchains and dependencies land in an isolated sandbox rather than in the system; a runner puts the artifact on a board or an emulator |
3032

31-
- **Native C++23 module support**`import std` handled automatically, file-level incremental builds, automatic module dependency analysis, zero manual configuration
32-
- **Pure modular self-hosting** — mcpp is written entirely in C++23 module interface units and builds itself with the pipeline it ships
33-
- **Works out of the box** — one-command install; the GCC or LLVM toolchain a build needs is downloaded into an isolated sandbox, never polluting your system
34-
- **Dependencies and workspaces** — SemVer constraint resolution, lockfile, cross-project BMI cache, custom package indices, and multi-package workspaces sharing one lockfile
35-
- **One flag changes the target**`--target` reaches from Linux, Windows and macOS to Cortex-M and RISC-V bare metal; the toolchain payload is resolved and installed for you, and a runner puts the artifact on the board
36-
- **Accelerators, and a way to extend** — CUDA, HIP, SYCL, Vulkan/SPIR-V and Ascend C each have a rule package; a step with no rule is written in `build.mcpp`, and packaged as a rule for other projects
33+
mcpp is written entirely in C++23 module interface units and builds itself with
34+
this pipeline, so every row above runs on mcpp itself every day.
3735

3836
## Why mcpp
3937

40-
mcpp is built specifically for **C++23 module-first development**. If you want to use `import std`, module interface units (`.cppm`), module partitions, and other modern C++ features in your project, mcpp gives you a smooth, friendly experience on Linux, macOS ARM64, and Windows x86_64:
38+
mcpp is built specifically for **C++23 module-first development**. If you want to use `import std`, module interface units (`.cppm`), module partitions, and other modern C++ features in your project, mcpp gives you a smooth, friendly experience on Linux, macOS ARM64, and Windows x86_64.
39+
40+
C++ normally spreads these five jobs across five tools, and mcpp is one command
41+
for all five. The second row names what each column is usually recognised as.
4142

42-
- **Modular by default** — projects created by `mcpp new` use C++23 modules directly; `import std` just works
43-
- **File-level incremental builds** — three-layer optimization based on P1689 dyndep (front-end dirty check + per-file scanning + BMI restat); only the modules that actually changed get recompiled
44-
- **Create & build in one go**`mcpp new hello && cd hello && mcpp build`; toolchains install automatically, no compiler or build-system setup required
45-
- **A modular ecosystem**[mcpplibs](https://github.com/mcpplibs) offers a growing set of directly `import`-able C++ module libraries, plus support for custom package indices
43+
| mcpp | build system | build plugins | package manager | toolchain manager | environment and runtime |
44+
|---|---|---|---|---|---|
45+
| **closest to** | CMake + Ninja | CMake modules, xmake rules | vcpkg, Conan | rustup, nvm | conda, Nix |
4646

4747
> [!NOTE]
4848
> **Early-stage project** — mcpp is under active development; interfaces and behavior may change in future releases.

README.zh-CN.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,31 +18,31 @@
1818
<img src="https://github.com/user-attachments/assets/6c85896e-9a37-4f62-acfb-d37a4eae2363" alt="mcpp demo" width="720">
1919
</p>
2020

21-
C++ 通常把这五件事分给五个工具。mcpp 用一条命令承担全部五件 —— 第二行是每一列
22-
在既有认知里通常对应的东西。
21+
## 核心特性
2322

24-
| | 通用构建系统 | 构建插件 | 包管理 | 工具链管理 | 环境与运行时 |
25-
|---|---|---|---|---|---|
26-
| **mcpp** | 模块优先的 C++ 构建,ninja 后端 | `build.mcpp` 与规则包 | SemVer、锁文件、包索引 | `family@version`,按需安装 | xlings —— 隔离沙盒里的用户态环境 |
27-
| **最接近的** | CMake + Ninja | CMake modules、xmake rules | vcpkg、Conan | rustup、nvm | conda、Nix |
23+
左列是 mcpp 是什么,右列是它被用来做什么。
2824

29-
## 核心特性
25+
| 能力 | 用它做的事 |
26+
|---|---|
27+
| **通用构建系统** —— C++23 模块原生支持,`import std` 自动处理,文件级增量构建,模块依赖自动分析 | `mcpp new && mcpp build`,没有要配置的东西;接口没有变化,就不会级联到导入它的那些单元 |
28+
| **构建插件** —— `build.mcpp` 与规则包 | mcpp 没有现成规则的那一步写一次,就能打成包给别的项目用;CUDA、HIP、SYCL、Vulkan/SPIR-V 与 Ascend C 各是一个规则包 |
29+
| **包管理** —— SemVer 约束、锁文件、跨项目 BMI 缓存、自定义索引 | 两行清单引入一个社区模块化库并直接 `import`;多个包在 workspace 里共用一份锁文件 |
30+
| **工具链管理** —— `family@version`,按需安装 | 本机不必先装编译器;`--target` 让同一次构建换到 Windows、macOS、Cortex-M 或 RISC-V 裸机 |
31+
| **环境与运行时** —— xlings 提供的用户态环境 | 工具链与依赖落在隔离沙盒里而不是系统里;runner 把产物送上板子或模拟器 |
3032

31-
- **C++23 模块原生支持**`import std` 自动处理,文件级增量构建,模块依赖自动分析,零手动配置
32-
- **纯模块化自举** — mcpp 完全由 C++23 模块接口单元写成,并用它自己发布的这条流水线构建自己
33-
- **开箱即用** — 一条命令安装;构建所需的 GCC 或 LLVM 工具链自动下载到隔离沙盒,不污染系统
34-
- **依赖与工作空间** — SemVer 约束解析、锁文件、跨项目 BMI 缓存、自定义包索引,以及共用一份锁文件的多包 workspace
35-
- **换目标只换一个开关**`--target` 从 Linux、Windows、macOS 一路到 Cortex-M 与 RISC-V 裸机;工具链载荷自动解析安装,产物由 runner 送上板子
36-
- **加速器,以及扩展的方式** — CUDA、HIP、SYCL、Vulkan/SPIR-V 与 Ascend C 各有规则包;没有现成规则的那一步用 `build.mcpp` 写,并可打成规则包给别人用
33+
mcpp 完全由 C++23 模块接口单元写成,并用这条流水线构建自己 —— 上面每一行,每天都在
34+
mcpp 自己身上跑一遍。
3735

3836
## 为什么选择 mcpp
3937

40-
mcpp 专门为 **C++23 模块化开发** 打造。如果你想在项目中使用 `import std`、模块接口单元(`.cppm`)、模块分区等现代 C++ 特性,mcpp 在 Linux、macOS ARM64 和 Windows x86_64 上能为你提供便捷且友好的开发体验:
38+
mcpp 专门为 **C++23 模块化开发** 打造。如果你想在项目中使用 `import std`、模块接口单元(`.cppm`)、模块分区等现代 C++ 特性,mcpp 在 Linux、macOS ARM64 和 Windows x86_64 上能为你提供便捷且友好的开发体验。
39+
40+
C++ 通常把这五件事分给五个工具,而 mcpp 用一条命令承担全部五件。第二行是每一列
41+
在既有认知里通常对应的东西。
4142

42-
- **默认模块化**`mcpp new` 创建的项目模板直接使用 C++23 模块,`import std` 开箱即用
43-
- **文件级增量构建** — 基于 P1689 dyndep 的三层优化(前端脏检查 + 逐文件扫描 + BMI restat),只重编真正变化的模块
44-
- **一键创建 & 构建**`mcpp new hello && cd hello && mcpp build`,工具链自动安装,无需手动配置编译器和构建系统
45-
- **模块化生态**[mcpplibs](https://github.com/mcpplibs) 提供一系列可直接 `import` 的 C++ 模块化库,支持自定义包索引
43+
| mcpp | 通用构建系统 | 构建插件 | 包管理 | 工具链管理 | 环境与运行时 |
44+
|---|---|---|---|---|---|
45+
| **最接近的** | CMake + Ninja | CMake modules、xmake rules | vcpkg、Conan | rustup、nvm | conda、Nix |
4646

4747
> [!NOTE]
4848
> **早期版本** — mcpp 仍在积极开发中,接口和行为可能在后续版本调整。

0 commit comments

Comments
 (0)