Skip to content

2026.9.5.3: a feature-selected rule collection, mcpp.rules.* naming, and a variant switch the fast path no longer replays - #566

Merged
Sunrisepeak merged 2 commits into
mainfrom
feat/vulkan-spirv
Sep 5, 2026
Merged

2026.9.5.3: a feature-selected rule collection, mcpp.rules.* naming, and a variant switch the fast path no longer replays#566
Sunrisepeak merged 2 commits into
mainfrom
feat/vulkan-spirv

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

Summary

Release 2026.9.5.3. Four changes to the engine and its documentation, each with its own criterion, and the withdrawal of the rule packages from examples/ in favour of the official plugin collection.

1. A host-module package contributes every interface unit its features select

A host-module = true package used to contribute exactly one module: the unit at its lib root. Every module interface unit among the package's feature-resolved [build] sources is now a host module of its own, registered under the name it declares, the lib root first (so a feature unit may import it). Only listed sources take part; the inferred src/** of a package with no sources is not consulted, so nothing already published changes shape.

This is what lets one package, mcpp:plugins (mcpp-community/mcpp-plugins), carry mcpp.rules.cuda and mcpp.rules.spirv and let a consumer say which it needs in the one place it says everything else about a dependency:

[dependencies.mcpp]
plugins = { version = "0.1.0", features = ["rules-spirv"], host-module = true }

Criteria: e2e 610 (a feature makes its unit importable; an inactive feature's unit is not compiled and cannot be imported; two features give two modules; the mcpp namespace draws no reserved-prefix warning while another namespace draws one per unit; a package with neither a lib root nor a listed unit keeps its diagnostic), tests/unit/test_provisions for the interface-unit detector, e2e 189 and 309 unchanged.

2. Naming: mcpp.rules.* and mcpp.tools.*

mcpp.build.<x> was the wrong prefix for a plugin: it is the engine's own module family (mcpp.build.plan, mcpp.build.prepare). The rule-package specification had withdrawn mcpp.rules.* only because a host module's name was then its bare package name; I1 removed that objection. Specification I8 and section 7, docs 05 and 07 (both languages; the Chinese naming paragraph did not exist before) state the rule. Examples 09 and 10 consume the index package like any project.

3. A variant switch is no longer replayed by the fast path

mcpp build, mcpp build --no-accel, mcpp build: the third reported Finished in 0.00s and mcpp run executed the CPU variant. The device variant is in the fingerprint, so the two builds land in different directories, and the fast path -- which runs before any plan exists -- replayed whichever directory was built last. The graph header now records the selection (accel=default|override); the two fast paths replay only a graph the manifest's own variant wrote, and a graph predating the field is a miss, never a guess. Criteria: e2e 611, tests/unit/test_graph_shape, the extended test_loader_contract.

4. The device-source table is by compiler, not by vendor

18 extensions (CUDA, HIP, the GLSL stages, HLSL, OpenCL C, Metal); the default globs still exclude every one of them and they were a hard error before, so no existing build changes. Criteria: e2e 609 with the table as its denominator, tests/unit/test_source_kind.

Documentation

  • Chapter 20 renamed to Heterogeneous Builds (docs/20-heterogeneous-builds.md, both languages); the accel key is unchanged.
  • Decorative symbols removed from docs, README, CHANGELOG, code comments and workflow comments; table cells that carried a value only through a symbol now carry a word.

Verification on the author's machine

  • Unit: mcpp test green after the two fixes below; e2e: 301 passed, 168 fails as on origin/main (musl helper not available on this host).
  • examples/09-cuda-kernel through mcpp:plugins: 12 24 36 48 on the RTX 4080 (clang route) and on the CPU variant.
  • examples/10-vulkan-compute through mcpp:plugins and compat.vulkan-runtime@2026.09.05: 12 24 36 48 on the host ICD and on the CPU variant.

…naming, and a variant switch the fast path no longer replays

A host-module package contributes every module interface unit among its
feature-resolved sources, the lib root first; only listed sources take
part. This is what lets mcpp:plugins carry mcpp.rules.cuda and
mcpp.rules.spirv, selected by features. The rule packages leave examples/;
examples 09 and 10 consume the index package. The prefix is mcpp.rules.*
for rules and mcpp.tools.* for utilities; mcpp.build.* is the engine's own
module family and the specification is corrected accordingly.

The graph header records whether --accel/--no-accel chose the variant, and
the fast paths decline a graph an override wrote: a plain build after
--no-accel used to report Finished in 0.00s and run the CPU variant.

The device-source table is by compiler, not by vendor: 18 extensions,
none in the default globs, all a hard error before.

Chapter 20 is renamed to Heterogeneous Builds; docs 05 and 07 gain the
collection and naming sections in both languages.
…kflow comments

Table cells whose value was carried by a symbol alone now carry a word
(yes, no, partial, planned); three comment lists that distinguished
accepted from refused forms keep the distinction in words.
@Sunrisepeak
Sunrisepeak merged commit 03b5074 into main Sep 5, 2026
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants