From 1fa8f792748cd17c6228eb677fd535bbbbf1cf7a Mon Sep 17 00:00:00 2001 From: Sunrisepeak Date: Sat, 5 Dec 2026 05:10:12 +0900 Subject: [PATCH] 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. --- README.md | 4 ++-- README.zh-CN.md | 4 ++-- docs/00-engine-and-rules.md | 6 +++--- docs/01-plugin-development.md | 6 +++--- docs/02-tool-sources.md | 4 ++-- docs/11-rules-qt.md | 4 ++-- docs/12-rules-qml.md | 6 +++--- docs/32-dist-apk.md | 4 ++-- docs/40-deps.md | 4 ++-- 9 files changed, 21 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index b824648..2678d87 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,8 @@ package never reaches the target. ## Quick start ```toml -[build-dependencies.mcpp] -plugins = { version = "0.27.0", features = ["rules-spirv"] } +[build-dependencies] +mcpp.plugins = { version = "0.27.0", features = ["rules-spirv"] } ``` ```cpp diff --git a/README.zh-CN.md b/README.zh-CN.md index ddec89f..e105e42 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -16,8 +16,8 @@ mcpp 是一个带有构建插件框架的通用引擎;插件来自本包(`mcpp:p ## 快速开始 ```toml -[build-dependencies.mcpp] -plugins = { version = "0.27.0", features = ["rules-spirv"] } +[build-dependencies] +mcpp.plugins = { version = "0.27.0", features = ["rules-spirv"] } ``` ```cpp diff --git a/docs/00-engine-and-rules.md b/docs/00-engine-and-rules.md index e2619c6..04ad4a0 100644 --- a/docs/00-engine-and-rules.md +++ b/docs/00-engine-and-rules.md @@ -40,8 +40,8 @@ engine's own module family and is not used here. A project names the rule and nothing else: ```toml -[build-dependencies.mcpp] -plugins = { version = "0.19.0", features = ["rules-cuda"], host-module = true } +[build-dependencies] +mcpp.plugins = { version = "0.19.0", features = ["rules-cuda"] } ``` 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: | `rules-hip` | `.hip` | | `rules-metal` | `.metal` | | `rules-qt` | `.ui`, `.qrc`, `.ts`; a header is found by what it declares, since `.h` is already C++ | -| `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 | +| `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 | | `rules-slang` | `.slang` | | `rules-swift` | `.swift` | | `rules-sycl` | `.sycl` | diff --git a/docs/01-plugin-development.md b/docs/01-plugin-development.md index 9a2f61a..87a084d 100644 --- a/docs/01-plugin-development.md +++ b/docs/01-plugin-development.md @@ -51,8 +51,8 @@ mcpp-index refuses such a package. **Using L2 from another package.** ```toml -[build-dependencies.mcpp] -plugins = { version = "0.27.0", features = ["plugins-core"], host-module = true, reexport = true } +[build-dependencies] +mcpp.plugins = { version = "0.27.0", features = ["plugins-core"], reexport = true } ``` `reexport = true` is needed when the plugin's consumers import L2 modules in @@ -234,7 +234,7 @@ A plugin in this package consists of: - a page under `docs/`; - a version bump. -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. +A project's own plugin is a module in the project (a path dependency in `[build-dependencies]`) and follows §2 in the same way. ## Optional action progress diff --git a/docs/02-tool-sources.md b/docs/02-tool-sources.md index 473f7d6..229e586 100644 --- a/docs/02-tool-sources.md +++ b/docs/02-tool-sources.md @@ -309,8 +309,8 @@ succeeded either way. ### 4.1 Write nothing ```toml -[build-dependencies.mcpp] -plugins = { version = "0.19.0", features = ["deps-cmake"], host-module = true } +[build-dependencies] +mcpp.plugins = { version = "0.19.0", features = ["deps-cmake"] } ``` The plugin resolves nothing stated, reaches the fourth level, finds `xim:cmake` diff --git a/docs/11-rules-qt.md b/docs/11-rules-qt.md index f47f50a..c59687d 100644 --- a/docs/11-rules-qt.md +++ b/docs/11-rules-qt.md @@ -5,8 +5,8 @@ ## Use ```toml -[build-dependencies.mcpp] -plugins = { version = "0.19.0", features = ["rules-qt"], host-module = true } +[build-dependencies] +mcpp.plugins = { version = "0.19.0", features = ["rules-qt"] } # The SDK and its version are the project's declaration. [target.'cfg(any(windows, linux, macos))'.xlings.workspace] diff --git a/docs/12-rules-qml.md b/docs/12-rules-qml.md index 97766c7..15fc464 100644 --- a/docs/12-rules-qml.md +++ b/docs/12-rules-qml.md @@ -5,8 +5,8 @@ ## Use ```toml -[build-dependencies.mcpp] -plugins = { version = "0.27.0", features = ["rules-qml"], host-module = true } +[build-dependencies] +mcpp.plugins = { version = "0.27.0", features = ["rules-qml"] } # QML needs Qt Quick, which `xim:qt` carries and `xim:qt-base` does not. [target.'cfg(any(windows, linux, macos))'.xlings.workspace] @@ -43,7 +43,7 @@ QQmlComponent component(&engine); component.loadFromModule("Probe", "Main"); ``` -`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. +`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. ## A module diff --git a/docs/32-dist-apk.md b/docs/32-dist-apk.md index c559d78..f517f1d 100644 --- a/docs/32-dist-apk.md +++ b/docs/32-dist-apk.md @@ -26,8 +26,8 @@ Every path option is relative to the manifest or absolute. Both features imply `dist-apk`, so a project names them in its place: ```toml -[build-dependencies.mcpp] -plugins = { version = "0.19.0", features = ["dist-apk-kotlin", "dist-apk-maven"], host-module = true } +[build-dependencies] +mcpp.plugins = { version = "0.19.0", features = ["dist-apk-kotlin", "dist-apk-maven"] } ``` They are features and not payloads of `dist-apk` because a feature is what a diff --git a/docs/40-deps.md b/docs/40-deps.md index fbff33d..db03483 100644 --- a/docs/40-deps.md +++ b/docs/40-deps.md @@ -23,8 +23,8 @@ Module `mcpp.deps.archive`; engine floor: 2026.10.1.3 (0.19.0, mcpp#755; 2026.9. ## `deps-vcpkg`: the libraries a vcpkg manifest names ```toml -[build-dependencies.mcpp] -plugins = { version = "0.19.0", features = ["deps-vcpkg"], host-module = true } +[build-dependencies] +mcpp.plugins = { version = "0.19.0", features = ["deps-vcpkg"] } ``` ```cpp