Skip to content

Commit 1fa8f79

Browse files
committed
Docs write the plugins edge as a dotted key and omit host-module where it restates the default
A [build-dependencies] entry asks for the package's library unless it lists tools or artifacts, so host-module = true on an entry that names a version and features restates the default. The examples write the full identity as a dotted key of [build-dependencies], the spelling mcpp add writes.
1 parent 82fbd48 commit 1fa8f79

9 files changed

Lines changed: 21 additions & 21 deletions

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ package never reaches the target.
1818
## Quick start
1919

2020
```toml
21-
[build-dependencies.mcpp]
22-
plugins = { version = "0.27.0", features = ["rules-spirv"] }
21+
[build-dependencies]
22+
mcpp.plugins = { version = "0.27.0", features = ["rules-spirv"] }
2323
```
2424

2525
```cpp

‎README.zh-CN.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ mcpp 是一个带有构建插件框架的通用引擎;插件来自本包(`mcpp:p
1616
## 快速开始
1717

1818
```toml
19-
[build-dependencies.mcpp]
20-
plugins = { version = "0.27.0", features = ["rules-spirv"] }
19+
[build-dependencies]
20+
mcpp.plugins = { version = "0.27.0", features = ["rules-spirv"] }
2121
```
2222

2323
```cpp

‎docs/00-engine-and-rules.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ engine's own module family and is not used here.
4040
A project names the rule and nothing else:
4141

4242
```toml
43-
[build-dependencies.mcpp]
44-
plugins = { version = "0.19.0", features = ["rules-cuda"], host-module = true }
43+
[build-dependencies]
44+
mcpp.plugins = { version = "0.19.0", features = ["rules-cuda"] }
4545
```
4646

4747
The payloads each rule drives are declared **here**, under the feature that
@@ -96,7 +96,7 @@ Each rule therefore selects the extensions it claims and leaves the rest:
9696
| `rules-hip` | `.hip` |
9797
| `rules-metal` | `.metal` |
9898
| `rules-qt` | `.ui`, `.qrc`, `.ts`; a header is found by what it declares, since `.h` is already C++ |
99-
| `rules-qml` | nothing: a `.qml` file needs a module uri and a version that `[build] sources` cannot state, so the project states its modules in `build.mcpp` and writes `host-module = true`; the `rules-qt` it implies keeps its claims |
99+
| `rules-qml` | nothing: a `.qml` file needs a module uri and a version that `[build] sources` cannot state, so the project states its modules in `build.mcpp`; the `rules-qt` it implies keeps its claims |
100100
| `rules-slang` | `.slang` |
101101
| `rules-swift` | `.swift` |
102102
| `rules-sycl` | `.sycl` |

‎docs/01-plugin-development.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ mcpp-index refuses such a package.
5151
**Using L2 from another package.**
5252

5353
```toml
54-
[build-dependencies.mcpp]
55-
plugins = { version = "0.27.0", features = ["plugins-core"], host-module = true, reexport = true }
54+
[build-dependencies]
55+
mcpp.plugins = { version = "0.27.0", features = ["plugins-core"], reexport = true }
5656
```
5757

5858
`reexport = true` is needed when the plugin's consumers import L2 modules in
@@ -234,7 +234,7 @@ A plugin in this package consists of:
234234
- a page under `docs/`;
235235
- a version bump.
236236

237-
A project's own plugin is a module in the project (a path dependency with `host-module = true`) and follows §2 in the same way.
237+
A project's own plugin is a module in the project (a path dependency in `[build-dependencies]`) and follows §2 in the same way.
238238

239239
## Optional action progress
240240

‎docs/02-tool-sources.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,8 +309,8 @@ succeeded either way.
309309
### 4.1 Write nothing
310310

311311
```toml
312-
[build-dependencies.mcpp]
313-
plugins = { version = "0.19.0", features = ["deps-cmake"], host-module = true }
312+
[build-dependencies]
313+
mcpp.plugins = { version = "0.19.0", features = ["deps-cmake"] }
314314
```
315315

316316
The plugin resolves nothing stated, reaches the fourth level, finds `xim:cmake`

‎docs/11-rules-qt.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
## Use
66

77
```toml
8-
[build-dependencies.mcpp]
9-
plugins = { version = "0.19.0", features = ["rules-qt"], host-module = true }
8+
[build-dependencies]
9+
mcpp.plugins = { version = "0.19.0", features = ["rules-qt"] }
1010

1111
# The SDK and its version are the project's declaration.
1212
[target.'cfg(any(windows, linux, macos))'.xlings.workspace]

‎docs/12-rules-qml.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
## Use
66

77
```toml
8-
[build-dependencies.mcpp]
9-
plugins = { version = "0.27.0", features = ["rules-qml"], host-module = true }
8+
[build-dependencies]
9+
mcpp.plugins = { version = "0.27.0", features = ["rules-qml"] }
1010

1111
# QML needs Qt Quick, which `xim:qt` carries and `xim:qt-base` does not.
1212
[target.'cfg(any(windows, linux, macos))'.xlings.workspace]
@@ -43,7 +43,7 @@ QQmlComponent component(&engine);
4343
component.loadFromModule("Probe", "Main");
4444
```
4545
46-
`rules-qml` claims no file extension and names no `rule_module`: a `.qml` file needs a uri and a version that `[build] sources` cannot state, so the project writes `host-module = true` and states its modules in `build.mcpp`. The `rules-qt` it implies keeps its own claim of `.ui`, `.qrc` and `.ts`. One `qml::compile` call also runs what `qt::compile` runs, with `options::qt`; call one of them, not both.
46+
`rules-qml` claims no file extension and names no `rule_module`: a `.qml` file needs a uri and a version that `[build] sources` cannot state, so the project states its modules in `build.mcpp`; its `[build-dependencies]` entry gives `build.mcpp` the library as for any member. The `rules-qt` it implies keeps its own claim of `.ui`, `.qrc` and `.ts`. One `qml::compile` call also runs what `qt::compile` runs, with `options::qt`; call one of them, not both.
4747
4848
## A module
4949

‎docs/32-dist-apk.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ Every path option is relative to the manifest or absolute.
2626
Both features imply `dist-apk`, so a project names them in its place:
2727

2828
```toml
29-
[build-dependencies.mcpp]
30-
plugins = { version = "0.19.0", features = ["dist-apk-kotlin", "dist-apk-maven"], host-module = true }
29+
[build-dependencies]
30+
mcpp.plugins = { version = "0.19.0", features = ["dist-apk-kotlin", "dist-apk-maven"] }
3131
```
3232

3333
They are features and not payloads of `dist-apk` because a feature is what a

‎docs/40-deps.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ Module `mcpp.deps.archive`; engine floor: 2026.10.1.3 (0.19.0, mcpp#755; 2026.9.
2323
## `deps-vcpkg`: the libraries a vcpkg manifest names
2424

2525
```toml
26-
[build-dependencies.mcpp]
27-
plugins = { version = "0.19.0", features = ["deps-vcpkg"], host-module = true }
26+
[build-dependencies]
27+
mcpp.plugins = { version = "0.19.0", features = ["deps-vcpkg"] }
2828
```
2929

3030
```cpp

0 commit comments

Comments
 (0)