Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,18 @@ env:
# 0.0.94 fixed feature-gated `sources` under `mcpp test` (mcpp#218); 0.0.91
# added standard = "c++fly" to the resolver grammar, so c++fly descriptors
# get the lint WARN below, not a hard grammar-parse rejection.
MCPP_VERSION: "2026.8.5.4"
# 2026.8.6.1 是本次身份迁移的**前置**,不是顺手升级。
#
# `Fetcher::install_path(ns, shortName, version)` 的 legacy 扫描此前匹配任何以
# `-x-<shortName>` 结尾的目录、不看命名空间,于是查 `ocornut:imgui@1.92.8` 会拿到
# `compat-x-imgui/1.92.8` —— 另一个仅仅短名相同的包。它一直够不到,是因为 module
# 层用打包计数(imgui@0.0.6)而 compat 用上游版本(compat.imgui@1.92.8),版本永远
# 不撞;本次把 module 层对齐到上游之后它们重合了。mcpp#364 修掉了它。
#
# index.toml 的 min_mcpp **不动**。两个会撞的 compat 邻居都是 Form B,所以旧客户端
# 撞上时是响亮报错而不是静默用错包;下限是一道让整个索引对旧客户端失效的闸门
# (mcpp#349),只该在描述符真的读不动时抬。这里读得动,差的是解析得对。
MCPP_VERSION: "2026.8.6.1"

jobs:
lint:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ tests/examples/*/mcpp.lock
tests/examples/build-mcpp/src/generated.cpp
imgui.ini
tests/examples/*/imgui.ini

# 本地 git worktree(逐包验证时开的),不属于索引内容
.worktrees/
50 changes: 50 additions & 0 deletions pkgs/f/ffmpeg.ffmpeg.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
-- FFmpeg 的 C++23 module 层(import ffmpeg.av;),建在 compat.ffmpeg 的源码构建之上。
--
-- 由 `mcpplibs:ffmpeg@0.0.3` 迁来 —— 那个版本号是打包计数,真实答案一直写在
-- ffmpeg-m 自己的 manifest 里:compat.ffmpeg = "8.1.2"。旧条目冻结保留。
-- 命名空间说的是这个库是谁的,不是谁打的包;版本说的是你拿到的是哪一版上游。
-- 规则与全生态迁移表:mcpp-index#163。
--
-- `mcpplibs` 是 mcpp 的**默认命名空间**(`kDefaultNamespace`),裸名就落在那里 ——
-- 它不是"上游是谁"的答案。因此上游库迁到上游 org 名下,消费者写限定名。
package = {
spec = "1",
namespace = "ffmpeg",
name = "ffmpeg",
description = "FFmpeg 8.1.2 C++ modules for mcpp (import ffmpeg.av;) on top of the compat.ffmpeg source build",
licenses = {"MIT"},
repo = "https://github.com/mcpplibs/ffmpeg-m",
type = "package",

xpm = {
linux = {
["8.1.2"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/ffmpeg-m/archive/refs/tags/v8.1.2.tar.gz",
CN = "https://gitcode.com/mcpp-res/ffmpeg/releases/download/8.1.2/ffmpeg-m-8.1.2.tar.gz",
},
sha256 = "776d37fcaeb2b829185877b24c8ea9f663ff2b1c3d5db7425c4a29f8b0b9bc6c",
},
},
macosx = {
["8.1.2"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/ffmpeg-m/archive/refs/tags/v8.1.2.tar.gz",
CN = "https://gitcode.com/mcpp-res/ffmpeg/releases/download/8.1.2/ffmpeg-m-8.1.2.tar.gz",
},
sha256 = "776d37fcaeb2b829185877b24c8ea9f663ff2b1c3d5db7425c4a29f8b0b9bc6c",
},
},
windows = {
["8.1.2"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/ffmpeg-m/archive/refs/tags/v8.1.2.tar.gz",
CN = "https://gitcode.com/mcpp-res/ffmpeg/releases/download/8.1.2/ffmpeg-m-8.1.2.tar.gz",
},
sha256 = "776d37fcaeb2b829185877b24c8ea9f663ff2b1c3d5db7425c4a29f8b0b9bc6c",
},
},
},

-- (无 `mcpp` 字段 —— 默认查找会命中 <verdir>/*/mcpp.toml)
}
12 changes: 12 additions & 0 deletions pkgs/f/ffmpeg.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
-- ⚠️ 已冻结 —— 本条目不再接收新版本。
--
-- 本包已迁往 `ffmpeg:ffmpeg@8.1.2`(见 pkgs/f/ffmpeg.ffmpeg.lua),理由是命名空间说的是这个库是谁的、
-- 版本说的是你拿到的是哪一版上游;`mcpplibs` 是 mcpp 的默认命名空间,两者都不是它
-- 该表达的东西。规则与全生态迁移表:mcpp-index#163。
--
-- 这里保留而不删除:已经在用 `mcpplibs:ffmpeg` 的消费者继续解析得到它。新版本只在新条目下
-- 发布。迁移方式是把依赖写成限定形式 ——
--
-- [dependencies.ffmpeg]
-- ffmpeg = "8.1.2"
--
-- Form A descriptor: the public ffmpeg module package ships its own
-- mcpp.toml. mcpp's default lookup finds <verdir>/*/mcpp.toml inside
-- the GitHub source tarball wrap.
Expand Down
47 changes: 47 additions & 0 deletions pkgs/g/ggml-org.llamacpp.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
-- llama.cpp 的 C++23 module 层(import llamacpp;),内含 pin 住的上游 checkpoint。
--
-- 版本就是上游的构建号。旧的 `0.1.0` 需要一张对照表才能读懂 —— llama.cpp-m 的
-- README 当时正是这么写的:"Version 0.1.0 maps to llama.cpp b10069"。
--
-- `b10069` 不是 semver。已实测 mcpp 能处理:解析、版本键匹配、wire 寻址都正常;
-- 不成立的只有**范围**(`^b10069` 解析不了),所以消费者精确 pin。见 mcpp#363。
--
-- 无 CN 镜像(与迁移前一致):mcpp-res 下没有对应仓库,而 docs/cn-mirror.md 明文
-- 允许单字符串 url 作为正当回退 —— lint 只对表形式要求 CN 指向 gitcode。
-- 命名空间说的是这个库是谁的,不是谁打的包;版本说的是你拿到的是哪一版上游。
-- 规则与全生态迁移表:mcpp-index#163。
--
-- `mcpplibs` 是 mcpp 的**默认命名空间**(`kDefaultNamespace`),裸名就落在那里 ——
-- 它不是"上游是谁"的答案。因此上游库迁到上游 org 名下,消费者写限定名。
package = {
spec = "1",
namespace = "ggml-org",
name = "llamacpp",
description = "C++23 module package for llama.cpp b10069 (import llamacpp;)",
licenses = {"MIT"},
repo = "https://github.com/mcpplibs/llama.cpp-m",
type = "package",

xpm = {
linux = {
["b10069"] = {
url = "https://github.com/mcpplibs/llama.cpp-m/archive/refs/tags/b10069.tar.gz",
sha256 = "be0b0deeb31136ea9cf0ba61eda1fb7baf8795a6579494a0991afd2323213e0b",
},
},
macosx = {
["b10069"] = {
url = "https://github.com/mcpplibs/llama.cpp-m/archive/refs/tags/b10069.tar.gz",
sha256 = "be0b0deeb31136ea9cf0ba61eda1fb7baf8795a6579494a0991afd2323213e0b",
},
},
windows = {
["b10069"] = {
url = "https://github.com/mcpplibs/llama.cpp-m/archive/refs/tags/b10069.tar.gz",
sha256 = "be0b0deeb31136ea9cf0ba61eda1fb7baf8795a6579494a0991afd2323213e0b",
},
},
},

-- (无 `mcpp` 字段 —— 默认查找会命中 <verdir>/*/mcpp.toml)
}
61 changes: 61 additions & 0 deletions pkgs/g/grpc-plugin.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
-- grpc_cpp_plugin —— gRPC 的 C++ 代码生成器,作为 mcpp host tool 构建。
--
-- 为什么是独立包而不是 grpc 里的一个 target:mcpp 把一个包编成**一个对象池**,
-- 并把其中每个实现对象链进该包的每个 kind="bin" 目标(src/build/plan.cppm 的
-- "Also include implementation .cpp/.cc/.cxx/.c units")。没有 per-target 源码
-- 分区。所以插件若住在 grpc 里,会链进全部约 1000 个 gRPC TU,并继承 OpenSSL /
-- re2 / c-ares / zlib —— 而它真正需要的只有 protobuf 的 libprotoc(9 个 TU)。
--
-- 也因此它的平台覆盖比主包宽:主包受 compat.openssl 的 windows 缺口限制,插件不受。
--
-- 代码是上游的(plugin/src/compiler/* 每个文件都是 Copyright gRPC authors),
-- 所以归 `grpc` 命名空间。
--
-- manifest 在归档的 plugin/ 子目录里,默认查找(<verdir>/mcpp.toml 与
-- <verdir>/*/mcpp.toml)够不到两级,故用显式 mcpp 指针。
-- 命名空间说的是这个库是谁的,不是谁打的包;版本说的是你拿到的是哪一版上游。
-- 规则与全生态迁移表:mcpp-index#163。
--
-- `mcpplibs` 是 mcpp 的**默认命名空间**(`kDefaultNamespace`),裸名就落在那里 ——
-- 它不是"上游是谁"的答案。因此上游库迁到上游 org 名下,消费者写限定名。
package = {
spec = "1",
namespace = "grpc",
name = "grpc-plugin",
description = "grpc_cpp_plugin 1.83.0 — the gRPC C++ code generator, buildable as an mcpp host tool",
licenses = {"Apache-2.0"},
repo = "https://github.com/mcpplibs/grpc-m",
type = "package",

xpm = {
linux = {
["1.83.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/grpc-m/archive/refs/tags/v1.83.0-2.tar.gz",
CN = "https://gitcode.com/mcpp-res/grpc/releases/download/1.83.0/grpc-m-1.83.0-2.tar.gz",
},
sha256 = "9083a85879f67b726d68130ca8374e791e3cc73f9fff8d324cde11314c70b06e",
},
},
macosx = {
["1.83.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/grpc-m/archive/refs/tags/v1.83.0-2.tar.gz",
CN = "https://gitcode.com/mcpp-res/grpc/releases/download/1.83.0/grpc-m-1.83.0-2.tar.gz",
},
sha256 = "9083a85879f67b726d68130ca8374e791e3cc73f9fff8d324cde11314c70b06e",
},
},
windows = {
["1.83.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/grpc-m/archive/refs/tags/v1.83.0-2.tar.gz",
CN = "https://gitcode.com/mcpp-res/grpc/releases/download/1.83.0/grpc-m-1.83.0-2.tar.gz",
},
sha256 = "9083a85879f67b726d68130ca8374e791e3cc73f9fff8d324cde11314c70b06e",
},
},
},

mcpp = "*/plugin/mcpp.toml",
}
25 changes: 18 additions & 7 deletions pkgs/g/grpc.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
-- 命名空间说的是这个库是谁的,不是谁打的包 —— gRPC 是 grpc/grpc 的,本仓库只是
-- vendored 它的源码并加了 module 层。`mcpplibs` 是 mcpp 的默认命名空间
-- (`kDefaultNamespace`),不是这个问题的答案。规则见 mcpp-index#163。
--
-- 与其余四个包不同,这条是**就地迁移**而非"旧的冻结 + 新增":它 2026-08-05 才进
-- 索引(#151),满打满算一天,唯一的消费者是本仓的 tests/examples/grpc-module。
-- 为一天的历史留一份永久重复条目不划算。
--
-- 归档换成 v1.83.0-2:`src/` / `include/` / `third_party/` 与 v1.83.0 逐字节相同,
-- 多出的只有 plugin/(grpc_cpp_plugin)与 rules/(grpcgen)。v1.83.0 的 sha256 已
-- 经发布过,移动 tag 会让它校验失败(mcpp#349:发布数据不得让程序失效),故另起。
-- Form A descriptor: the public gRPC package ships its own mcpp.toml, so this
-- file carries metadata and a download address and nothing else. mcpp's default
-- lookup finds <verdir>/*/mcpp.toml inside the GitHub source tarball wrap.
Expand Down Expand Up @@ -37,7 +48,7 @@
package = {
spec = "1",
name = "grpc",
namespace = "mcpplibs",
namespace = "grpc",
description = "gRPC 1.83.0 — vendored upstream source build with import grpc; (abseil/protobuf/re2/c-ares/OpenSSL come from this index)",
licenses = {"Apache-2.0"},
repo = "https://github.com/mcpplibs/grpc-m",
Expand All @@ -47,19 +58,19 @@ package = {
linux = {
["1.83.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/grpc-m/archive/refs/tags/v1.83.0.tar.gz",
CN = "https://gitcode.com/mcpp-res/grpc/releases/download/1.83.0/grpc-m-1.83.0.tar.gz",
GLOBAL = "https://github.com/mcpplibs/grpc-m/archive/refs/tags/v1.83.0-2.tar.gz",
CN = "https://gitcode.com/mcpp-res/grpc/releases/download/1.83.0/grpc-m-1.83.0-2.tar.gz",
},
sha256 = "99cf3bda0a4e025f674f08dd68183538c2f655c3f72a55e1e2c1f4e05a282f43",
sha256 = "9083a85879f67b726d68130ca8374e791e3cc73f9fff8d324cde11314c70b06e",
},
},
macosx = {
["1.83.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/grpc-m/archive/refs/tags/v1.83.0.tar.gz",
CN = "https://gitcode.com/mcpp-res/grpc/releases/download/1.83.0/grpc-m-1.83.0.tar.gz",
GLOBAL = "https://github.com/mcpplibs/grpc-m/archive/refs/tags/v1.83.0-2.tar.gz",
CN = "https://gitcode.com/mcpp-res/grpc/releases/download/1.83.0/grpc-m-1.83.0-2.tar.gz",
},
sha256 = "99cf3bda0a4e025f674f08dd68183538c2f655c3f72a55e1e2c1f4e05a282f43",
sha256 = "9083a85879f67b726d68130ca8374e791e3cc73f9fff8d324cde11314c70b06e",
},
},
-- No windows block, and the reason is a DEPENDENCY rather than gRPC:
Expand Down
61 changes: 61 additions & 0 deletions pkgs/g/grpcgen.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
-- grpcgen —— protoc + grpc_cpp_plugin 的调用收成一条可 import 的构建规则。
--
-- [dependencies]
-- grpcgen = { version = "1.83.0", host-module = true }
--
-- // build.mcpp
-- import mcpp;
-- import grpcgen;
-- int main() { return grpcgen::generate({"helloworld"}) ? 0 : 1; }
--
-- 这是本生态**自己写的** 163 行 C++(不是上游任何东西),所以留在 `mcpplibs`。
-- 包名承重:mcpp 用依赖的裸 package.name 注册 host 模块,故包名即模块名,必须是
-- 合法 C++ 模块名 —— `grpc-rules` 不行(连字符),`grpcgen` 可以。
--
-- 需要 mcpp >= 2026.8.5.2:规则里 `import std;` 与 `import mcpp;` 在此之前都编不过。
-- 命名空间说的是这个库是谁的,不是谁打的包;版本说的是你拿到的是哪一版上游。
-- 规则与全生态迁移表:mcpp-index#163。
--
-- `mcpplibs` 是 mcpp 的**默认命名空间**(`kDefaultNamespace`),裸名就落在那里 ——
-- 它不是"上游是谁"的答案。因此上游库迁到上游 org 名下,消费者写限定名。
package = {
spec = "1",
namespace = "mcpplibs",
name = "grpcgen",
description = "protoc + grpc_cpp_plugin codegen as an importable mcpp build rule (host-module)",
licenses = {"Apache-2.0"},
repo = "https://github.com/mcpplibs/grpc-m",
type = "package",

xpm = {
linux = {
["1.83.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/grpc-m/archive/refs/tags/v1.83.0-2.tar.gz",
CN = "https://gitcode.com/mcpp-res/grpc/releases/download/1.83.0/grpc-m-1.83.0-2.tar.gz",
},
sha256 = "9083a85879f67b726d68130ca8374e791e3cc73f9fff8d324cde11314c70b06e",
},
},
macosx = {
["1.83.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/grpc-m/archive/refs/tags/v1.83.0-2.tar.gz",
CN = "https://gitcode.com/mcpp-res/grpc/releases/download/1.83.0/grpc-m-1.83.0-2.tar.gz",
},
sha256 = "9083a85879f67b726d68130ca8374e791e3cc73f9fff8d324cde11314c70b06e",
},
},
windows = {
["1.83.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/grpc-m/archive/refs/tags/v1.83.0-2.tar.gz",
CN = "https://gitcode.com/mcpp-res/grpc/releases/download/1.83.0/grpc-m-1.83.0-2.tar.gz",
},
sha256 = "9083a85879f67b726d68130ca8374e791e3cc73f9fff8d324cde11314c70b06e",
},
},
},

mcpp = "*/rules/mcpp.toml",
}
12 changes: 12 additions & 0 deletions pkgs/i/imgui.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
-- ⚠️ 已冻结 —— 本条目不再接收新版本。
--
-- 本包已迁往 `ocornut:imgui@1.92.8`(见 pkgs/o/ocornut.imgui.lua),理由是命名空间说的是这个库是谁的、
-- 版本说的是你拿到的是哪一版上游;`mcpplibs` 是 mcpp 的默认命名空间,两者都不是它
-- 该表达的东西。规则与全生态迁移表:mcpp-index#163。
--
-- 这里保留而不删除:已经在用 `mcpplibs:imgui` 的消费者继续解析得到它。新版本只在新条目下
-- 发布。迁移方式是把依赖写成限定形式 ——
--
-- [dependencies.ocornut]
-- imgui = "1.92.8"
--
-- Form A descriptor: the public imgui module package ships its own
-- mcpp.toml. mcpp's default lookup finds <verdir>/*/mcpp.toml inside
-- the GitHub source tarball wrap.
Expand Down
12 changes: 12 additions & 0 deletions pkgs/l/llamacpp.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
-- ⚠️ 已冻结 —— 本条目不再接收新版本。
--
-- 本包已迁往 `ggml-org:llamacpp@b10069`(见 pkgs/g/ggml-org.llamacpp.lua),理由是命名空间说的是这个库是谁的、
-- 版本说的是你拿到的是哪一版上游;`mcpplibs` 是 mcpp 的默认命名空间,两者都不是它
-- 该表达的东西。规则与全生态迁移表:mcpp-index#163。
--
-- 这里保留而不删除:已经在用 `mcpplibs:llamacpp` 的消费者继续解析得到它。新版本只在新条目下
-- 发布。迁移方式是把依赖写成限定形式 ——
--
-- [dependencies.ggml-org]
-- llamacpp = "b10069"
--
-- Form A descriptor: llama.cpp-m ships its own mcpp.toml and a vendored,
-- pinned llama.cpp checkpoint. The default lookup finds that manifest inside
-- the GitHub tag archive. CPU is the default backend; Metal is an additive
Expand Down
Loading
Loading