Skip to content

docs(rules): state what actually binds a host module's name, on both engines - #6

Merged
Sunrisepeak merged 1 commit into
mainfrom
docs/module-name-is-declared
Aug 29, 2026
Merged

docs(rules): state what actually binds a host module's name, on both engines#6
Sunrisepeak merged 1 commit into
mainfrom
docs/module-name-is-declared

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

The rules/mcpp.toml header said the package name IS the module name. That is true on mcpp < 2026.8.29.1 and false after it: from mcpp#525 the module name is what rules/src/grpcgen.cppm declares, and the package name carries no C++ naming constraint.

Nothing about this package changes — it declares export module grpcgen; with name = "grpcgen", so the registered name is identical before and after. Verified by building a consumer against the new engine and comparing the emitted host-module object name (grpcgen.o, as before).

What the note now says instead is why keeping the two equal is right: renaming either alone would build under GCC and fail under Clang and MSVC on the older engines, because GCC finds the BMI by the declared name through gcm.cache while the other two are handed an explicit <name>=<bmi> mapping built from the registered name.

The "no dependencies on purpose" note is updated for the same reason: it described a limit (a host module is compiled alone) that has become a choice — a rule may now declare its own [build-dependencies]. This rule stays a leaf so it keeps working on older engines.

Documentation only. No behaviour change, and nothing here requires the new engine.

…engines

The manifest said the package name IS the module name. That is true on
mcpp < 2026.8.29.1 and false after it: from that release the module name is
what the interface declares, and the package name carries no C++ naming
constraint.

Keeping the two equal is what makes this package work on both, and the note now
says so -- along with why renaming either alone would build under GCC and fail
under Clang and MSVC on the older engines.

The 'no dependencies' note likewise described a limit that has become a choice:
a rule may now declare its own [build-dependencies]. This one stays a leaf so
it keeps working on older engines.
@Sunrisepeak
Sunrisepeak merged commit 5f1caba into main Aug 29, 2026
5 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.

1 participant