Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 19 additions & 6 deletions rules/mcpp.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,18 @@
# manager that already exists — and written in C++, so the build does not grow
# a second language the way xmake's Lua rules or Bazel's Starlark do.
#
# The package name is load-bearing: mcpp registers a host module under the
# dependency's `package.name`, so the name here IS the module name and must be
# a legal C++ module name (no hyphens, no dots).
# The package name and the module name are kept EQUAL, and that is what makes
# this package work on every engine rather than on the newest one.
#
# mcpp < 2026.8.29.1 registers a host module under the dependency's
# `package.name`, so on those engines the name here IS the module name. From
# 2026.8.29.1 the module name is what `src/grpcgen.cppm` declares, and the
# package name carries no C++ naming constraint at all.
#
# Keeping the two equal satisfies both. Renaming either one alone would build
# under GCC and fail under Clang and MSVC on the older engines -- 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.
#
# Versioned in lock-step with grpc and grpc-plugin: all three ship from one
# tag, and .github/workflows/ci.yml checks that they never drift apart.
Expand All @@ -32,8 +41,12 @@ license = "Apache-2.0"
repo = "https://github.com/mcpplibs/grpc-m"
platforms = ["linux", "macos", "windows"]

# No dependencies on purpose. A host module is compiled alongside build.mcpp,
# where only `std` and the bundled `mcpp` module exist — see the note at the
# top of src/grpcgen.cppm for why this rule uses neither.
# No dependencies, and from 2026.8.29.1 that is a CHOICE rather than a limit.
# Before it, a host module was compiled alone and could import only `std` and
# the bundled `mcpp` module; since it, a rule may declare its own
# `[build-dependencies]` and import any of them marked `host-module = true`.
#
# This rule stays a leaf so that it keeps working on older engines, and because
# it has nothing to reuse: what it does is compute a protoc command line.
[targets.grpcgen]
kind = "lib"
Loading