Skip to content

Commit ae12683

Browse files
committed
chore: bump mcpp to 0.0.11 + add mcpp usage to README
- .xlings.json: mcpp 0.0.8 → 0.0.11 - CI: mcpp 0.0.11 - README: add mcpp build/usage section
1 parent 03b5fb2 commit ae12683

3 files changed

Lines changed: 33 additions & 5 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,17 @@ jobs:
2323
"/tmp/xlings-${XLINGS_VERSION}-linux-x86_64/subos/default/bin/xlings" self install
2424
echo "$HOME/.xlings/subos/current/bin" >> "$GITHUB_PATH"
2525
26-
- name: Install workspace tools (.xlings.json → mcpp 0.0.8)
26+
- name: Install workspace tools (.xlings.json → mcpp 0.0.11)
2727
run: xlings install -y
2828

2929
# Cache mcpp's self-bootstrapped sandbox (musl-gcc + binutils +
3030
# glibc + ninja + patchelf, ~800 MB). Toolchain set is pinned by
31-
# mcpp 0.0.8, so a fixed key suffices.
31+
# mcpp 0.0.11, so a fixed key suffices.
3232
- name: Cache mcpp sandbox
3333
uses: actions/cache@v4
3434
with:
35-
path: ~/.xlings/data/xpkgs/xim-x-mcpp/0.0.8/registry
36-
key: mcpp-sandbox-${{ runner.os }}-mcpp0.0.8
35+
path: ~/.xlings/data/xpkgs/xim-x-mcpp/0.0.11/registry
36+
key: mcpp-sandbox-${{ runner.os }}-mcpp0.0.11
3737

3838
- name: Build with mcpp
3939
run: mcpp build

.xlings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"workspace": {
3-
"mcpp": { "linux": "0.0.8" }
3+
"mcpp": { "linux": "0.0.11" }
44
}
55
}

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,34 @@ target("myapp")
116116
set_policy("build.c++.modules", true)
117117
```
118118

119+
### mcpp
120+
121+
#### 添加依赖
122+
123+
```bash
124+
mcpp add mcpplibs.capi:lua@0.0.3
125+
```
126+
127+
或在 `mcpp.toml` 中手动添加:
128+
129+
```toml
130+
[dependencies]
131+
"mcpplibs.capi:lua" = "0.0.3"
132+
```
133+
134+
#### 构建
135+
136+
```bash
137+
mcpp build
138+
```
139+
140+
#### 代码示例
141+
142+
```cpp
143+
import mcpplibs.capi.lua;
144+
// ... 参见上方"快速开始"
145+
```
146+
119147
## 覆盖范围
120148

121149
封装了 Lua 5.4 C API 的核心功能:

0 commit comments

Comments
 (0)