Skip to content

Commit e89dfc6

Browse files
committed
Revert "feat: migrate to explicit namespace fields (mcpp 0.0.6) (#11)"
This reverts commit 654d9df.
1 parent 654d9df commit e89dfc6

11 files changed

Lines changed: 26 additions & 55 deletions

README.md

Lines changed: 16 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -7,43 +7,24 @@
77
## 快速使用
88

99
```bash
10-
mcpp add mcpplibs:cmdline@0.0.2 # 模块化库
11-
mcpp add compat:ftxui@6.1.9 # 非模块化兼容库
12-
mcpp build # 自动拉取源码 + 构建
10+
mcpp add ftxui@6.1.9 # 添加依赖到 mcpp.toml
11+
mcpp build # 自动拉取源码 + 构建
1312
```
1413

15-
## 命名空间
16-
17-
mcpp 0.0.6+ 使用显式 `namespace` 字段区分包的类别:
18-
19-
| namespace | 含义 | 鼓励使用 |
20-
|---|---|---|
21-
| `mcpplibs` | 模块化 C++23 库(mcpplibs 生态) | ✅ 推荐 |
22-
| `mcpplibs.capi` | C API 的 C++23 模块封装 | ✅ 推荐 |
23-
| `compat` | 非模块化 C/C++ 库(兼容性支持) | ⚠️ 建议优先使用模块化替代 |
24-
2514
## 已收录的包
2615

27-
### `mcpplibs` — 模块化库
28-
29-
| 包名 | 版本 | 简介 | 仓库 |
30-
|------|------|------|------|
31-
| `cmdline` | 0.0.2 | 命令行解析框架 — `import mcpplibs.cmdline;` | [mcpplibs/cmdline](https://github.com/mcpplibs/cmdline) |
32-
| `tinyhttps` | 0.2.2 | 轻量 HTTP/HTTPS 客户端(SSE 流式) — `import mcpplibs.tinyhttps;` | [mcpplibs/tinyhttps](https://github.com/mcpplibs/tinyhttps) |
33-
| `llmapi` | 0.2.5 | 大语言模型 API 客户端(OpenAI/Anthropic 兼容) — `import mcpplibs.llmapi;` | [mcpplibs/llmapi](https://github.com/mcpplibs/llmapi) |
34-
| `xpkg` | 0.0.39 | xpkg V1 规范的 C++23 参考实现 — `import mcpplibs.xpkg;` | [openxlings/libxpkg](https://github.com/openxlings/libxpkg) |
35-
| `templates` | 0.0.1 | 最小化模块库模板 — `import mcpplibs.templates;` | [mcpplibs/templates](https://github.com/mcpplibs/templates) |
36-
37-
### `mcpplibs.capi` — C API 封装
16+
### mcpplibs 模块化库
3817

3918
| 包名 | 版本 | 简介 | 仓库 |
4019
|------|------|------|------|
41-
| `lua` | 0.0.3 | Lua 5.4 C API 的 C++23 模块封装 — `import mcpplibs.capi.lua;` | [mcpplibs/lua](https://github.com/mcpplibs/lua) |
42-
43-
### `compat` — 非模块化兼容库
20+
| `mcpplibs.cmdline` | 0.0.2 | 命令行解析框架 — `import mcpplibs.cmdline;` | [mcpplibs/cmdline](https://github.com/mcpplibs/cmdline) |
21+
| `mcpplibs.tinyhttps` | 0.2.2 | 轻量 HTTP/HTTPS 客户端(SSE 流式) — `import mcpplibs.tinyhttps;` | [mcpplibs/tinyhttps](https://github.com/mcpplibs/tinyhttps) |
22+
| `mcpplibs.llmapi` | 0.2.5 | 大语言模型 API 客户端(OpenAI/Anthropic 兼容) — `import mcpplibs.llmapi;` | [mcpplibs/llmapi](https://github.com/mcpplibs/llmapi) |
23+
| `mcpplibs.capi.lua` | 0.0.3 | Lua 5.4 C API 的 C++23 模块封装 — `import mcpplibs.capi.lua;` | [mcpplibs/lua](https://github.com/mcpplibs/lua) |
24+
| `mcpplibs.xpkg` | 0.0.39 | xpkg V1 规范的 C++23 参考实现 — `import mcpplibs.xpkg;` | [openxlings/libxpkg](https://github.com/openxlings/libxpkg) |
25+
| `mcpplibs.templates` | 0.0.1 | 最小化模块库模板 — `import mcpplibs.templates;` | [mcpplibs/templates](https://github.com/mcpplibs/templates) |
4426

45-
> 这些库的上游没有 C++23 模块化支持,mcpp 通过 Form B 描述文件提供兼容性构建。
46-
> 建议优先使用对应的模块化封装(如 `mcpplibs.capi.lua` 替代 `compat.lua`)。
27+
### 第三方 C/C++ 库
4728

4829
| 包名 | 版本 | 简介 |
4930
|------|------|------|
@@ -55,13 +36,13 @@ mcpp 0.0.6+ 使用显式 `namespace` 字段区分包的类别:
5536
### 依赖关系链
5637

5738
```
58-
mcpplibs:llmapi
59-
└── mcpplibs:tinyhttps
60-
└── compat:mbedtls ← mcpp 自动传递,无需手动声明
39+
mcpplibs.llmapi
40+
└── mcpplibs.tinyhttps
41+
└── mbedtls ← mcpp 自动传递,无需手动声明
6142
62-
mcpplibs:xpkg
63-
└── mcpplibs.capi:lua
64-
└── compat:lua ← 同上
43+
mcpplibs.xpkg
44+
└── mcpplibs.capi.lua
45+
└── lua ← 同上
6546
```
6647

6748
mcpp 0.0.3+ 的 transitive walker 自动沿链路传播头文件和依赖,消费者只需声明直接依赖。
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010

1111
package = {
1212
spec = "1",
13-
namespace = "compat",
14-
name = "ftxui",
13+
name = "ftxui",
1514
description = "C++ Functional Terminal User Interface (screen + dom + component)",
1615
licenses = {"MIT"},
1716
repo = "https://github.com/ArthurSonzogni/FTXUI",
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55

66
package = {
77
spec = "1",
8-
namespace = "compat",
9-
name = "gtest",
8+
name = "gtest",
109
description = "Google's C++ test framework",
1110
licenses = {"BSD-3-Clause"},
1211
repo = "https://github.com/google/googletest",
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111

1212
package = {
1313
spec = "1",
14-
namespace = "compat",
15-
name = "lua",
14+
name = "lua",
1615
description = "A powerful, efficient, lightweight, embeddable scripting language",
1716
licenses = {"MIT"},
1817
repo = "https://www.lua.org",
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88

99
package = {
1010
spec = "1",
11-
namespace = "compat",
12-
name = "mbedtls",
11+
name = "mbedtls",
1312
description = "An open source, portable, easy to use, readable and flexible TLS library, and reference implementation of the PSA Cryptography API",
1413
licenses = {"Apache-2.0"},
1514
repo = "https://github.com/Mbed-TLS/mbedtls",
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
-- finds <verdir>/lua-<tag>/mcpp.toml inside the GitHub tarball wrap.
44
package = {
55
spec = "1",
6-
namespace = "mcpplibs.capi",
7-
name = "lua",
6+
name = "mcpplibs.capi.lua",
87
description = "C++23 module wrapping the Lua 5.4 C API — `import mcpplibs.capi.lua;`",
98
licenses = {"Apache-2.0"},
109
repo = "https://github.com/mcpplibs/lua",
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
-- `cmdline-<tag>/` wrap layer.
1111
package = {
1212
spec = "1",
13-
namespace = "mcpplibs",
14-
name = "cmdline",
13+
name = "mcpplibs.cmdline",
1514
description = "A simple command-line parsing library/framework for modern C++",
1615
licenses = {"Apache-2.0"},
1716
repo = "https://github.com/mcpplibs/cmdline",
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
-- wrap (`llmapi-<tag>/mcpp.toml`) automatically.
44
package = {
55
spec = "1",
6-
namespace = "mcpplibs",
7-
name = "llmapi",
6+
name = "mcpplibs.llmapi",
87
description = "Modern C++ LLM API client with openai-compatible support",
98
licenses = {"Apache-2.0"},
109
repo = "https://github.com/mcpplibs/llmapi",
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
-- default lookup is ambiguous or wrong for your tarball.
66
package = {
77
spec = "1",
8-
namespace = "mcpplibs",
9-
name = "templates",
8+
name = "mcpplibs.templates",
109
description = "Minimal C++23 modular hello library",
1110
licenses = {"Apache-2.0"},
1211
repo = "https://github.com/mcpp-community/templates",
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
-- finds <verdir>/<repo-tag>/mcpp.toml inside the GitHub tarball wrap.
44
package = {
55
spec = "1",
6-
namespace = "mcpplibs",
7-
name = "tinyhttps",
6+
name = "mcpplibs.tinyhttps",
87
description = "Minimal C++23 HTTP/HTTPS client with SSE streaming support",
98
licenses = {"Apache-2.0"},
109
repo = "https://github.com/mcpplibs/tinyhttps",

0 commit comments

Comments
 (0)