docs: C++ 里用 gRPC 的开发体验对比 - #5
Merged
Merged
Conversation
按开发者真实会遇到的场景组织,而不是能力矩阵:从零跑通、改一行 .proto 的循环、加一个新 .proto、出错那一刻、需求超出默认那一刻、换台机器。 三条不那么显然的结论: * **日常增量循环不是差异点**。五家都把 codegen 做成了构建图节点, 这是公共水位;它常被当卖点,但拉平了。 * **真正的分野是「生成器与运行时同源」**,而 gRPC 上游官方 CMake 样板 自己就在交叉编译分支上退回 find_program(protoc)。 * **可定制性该比「阶梯还是断崖」而不是「能不能改」**。CMake/Bazel 没有 起点、但也没有天花板,这是它们被低估的优点。 对手方的事实逐条核过上游原文(common.cmake ~110 行三分支、helloworld CMakeLists 67 行、examples/protos/BUILD 每 proto 13 行、xmake 的 protobuf.cpp rule、protobuf-generate.cmake 的 PLUGIN 参数),来源列在文末。 mcpp 侧的数字全部来自本次 xlings subos 沙箱实测,证据等级在正文逐条标注。 mcpp 的代价单列一节(生态最小、要求 C++23 modules、gRPC 仅 Linux/macOS、 mock 能生成不能编译、首次载荷 ~97MB、两条构建噪声 #373/#374)。 顺带:CI 加 paths-ignore。这条 workflow 的 linux 腿是 ~2h 的串行 gRPC 构建,而本次是纯 markdown —— 不堵的话它会被花两次(PR 一次、合入 main 再一次)。两个触发器都要加,否则合入那半照付。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
按开发者真实会遇到的场景组织(从零跑通 → 改一行 .proto → 加一个新 .proto → 出错那一刻 → 需求超出默认 → 换台机器),含两张矩阵:定性的开发体验矩阵(12 方面 × 5 工具)与只放可核验量的数字矩阵。
三条不那么显然的结论
find_program(protoc)。证据分级:对手方事实逐条核过上游原文(链接在文末),mcpp 侧数字全部来自本次 xlings subos 沙箱实测,正文按
[实测]/[引用]标注。作者利益披露与 mcpp 的代价各单列一节。顺带:CI 加
paths-ignore。这条 workflow 的 linux 腿是 ~2h 串行 gRPC 构建,纯 markdown 变更不堵会被花两次(PR 一次、合入 main 再一次);两个触发器都加,否则合入那半照付。