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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
## Add The Package

```sh
mcpp new llama_app --template mcpplibs.mwrap.llamacpp@b10069
mcpp new llama_app --template mcpplibs.mwrap.llamacpp@b10069.1
cd llama_app
mcpp run
```

```toml
[dependencies]
mcpplibs.mwrap.llamacpp = "b10069"
mcpplibs.mwrap.llamacpp = "b10069.1"
```

## Minimal CPU Program
Expand Down Expand Up @@ -58,7 +58,7 @@ Shader generation, libstdc++ constraints and driver boundaries are in [usage](do

## Supported Boundary

Pin `b10069` exactly; it is not a semver range. `.macros` exposes mapped constants.
Pin `b10069.1` exactly; it is not a semver range. `.macros` exposes mapped constants.
Model quality and unsupported GPU configurations are not implied by the CPU template.
[Upstream policy](docs/upstream-update-policy.md) · [Validation](docs/validation/b10069.md) · [Apache-2.0](LICENSE)

Expand Down
6 changes: 3 additions & 3 deletions README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
## 添加依赖

```sh
mcpp new llama_app --template mcpplibs.mwrap.llamacpp@b10069
mcpp new llama_app --template mcpplibs.mwrap.llamacpp@b10069.1
cd llama_app
mcpp run
```

```toml
[dependencies]
mcpplibs.mwrap.llamacpp = "b10069"
mcpplibs.mwrap.llamacpp = "b10069.1"
```

## 最小 CPU 程序
Expand Down Expand Up @@ -58,7 +58,7 @@ shader 生成、libstdc++ 限制及驱动边界见[使用说明](docs/usage.md)

## 支持边界

精确固定 `b10069`,不使用 semver 范围;`.macros` 导出映射常量。
精确固定 `b10069.1`,不使用 semver 范围;`.macros` 导出映射常量。
CPU 模板通过不代表模型质量或未支持 GPU 配置通过。
[上游策略](docs/upstream-update-policy.md) · [验证](docs/validation/b10069.md) · [Apache-2.0](LICENSE)

Expand Down
2 changes: 1 addition & 1 deletion docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ for exact evidence and remaining release gates.
The b10069 package adds a runnable default template. After that version is indexed:

```sh
mcpp new my-llama --template mcpplibs.mwrap.llamacpp@b10069
mcpp new my-llama --template mcpplibs.mwrap.llamacpp@b10069.1
cd my-llama
mcpp run
```
Expand Down
2 changes: 1 addition & 1 deletion examples/chat-cpu/mcpp.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ kind = "bin"
main = "src/main.cpp"

[dependencies]
"mcpplibs.mwrap.llamacpp" = { path = "../.." }
mcpplibs.mwrap.llamacpp = { path = "../.." }
2 changes: 1 addition & 1 deletion examples/chat-metal/mcpp.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ kind = "bin"
main = "src/main.cpp"

[dependencies]
"mcpplibs.mwrap.llamacpp" = { path = "../..", features = ["backend-metal"] }
mcpplibs.mwrap.llamacpp = { path = "../..", features = ["backend-metal"] }
2 changes: 1 addition & 1 deletion examples/chat-vulkan/mcpp.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ kind = "bin"
main = "src/main.cpp"

[dependencies]
"mcpplibs.mwrap.llamacpp" = { path = "../..", features = ["backend-vulkan"] }
mcpplibs.mwrap.llamacpp = { path = "../..", features = ["backend-vulkan"] }
2 changes: 1 addition & 1 deletion mcpp.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
[package]
namespace = "mcpplibs.mwrap"
name = "llamacpp"
version = "b10069"
version = "b10069.1"
description = "C++23 module package for llama.cpp b10069"
license = "Apache-2.0"
authors = ["mcpp-community"]
Expand Down
2 changes: 1 addition & 1 deletion templates/cpu/mcpp.toml.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ version = "0.1.0"
description = "llama.cpp CPU quickstart"

[dependencies]
"{{self.name}}" = "{{self.version}}"
{{self.name}} = "{{self.version}}"
11 changes: 7 additions & 4 deletions tools/test_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,20 @@ def main():
project = temporary / "quickstart"
manifest = project / "mcpp.toml"
text = manifest.read_text()
dependency = tomllib.loads(text)["dependencies"][identity]
# The key is unquoted, so TOML reads it as one table per segment.
dependency = tomllib.loads(text)["dependencies"]
for segment in identity.split("."):
dependency = dependency[segment]
options = {"version": dependency} if isinstance(dependency, str) else dependency
assert options["version"] == version, options
replacement = '{ path = ' + json.dumps(package.as_posix())
if options.get("features"):
replacement += ', features = ' + json.dumps(options["features"])
replacement += ' }'
lines = text.splitlines()
matches = [i for i, line in enumerate(lines) if line.startswith(json.dumps(identity) + " =")]
assert len(matches) == 1, "Expected exactly one qualified dependency from self.name"
lines[matches[0]] = json.dumps(identity) + " = " + replacement
matches = [i for i, line in enumerate(lines) if line.startswith(identity + " =")]
assert len(matches) == 1, "Expected exactly one unquoted qualified dependency from self.name"
lines[matches[0]] = identity + " = " + replacement
manifest.write_text("\n".join(lines) + "\n")
command = [args.mcpp, "run", "--toolchain", args.toolchain]
if args.run_arg:
Expand Down
Loading