wwbmmm commented on code in PR #3558:
URL: https://github.com/apache/brpc/pull/3558#discussion_r4176316526


##########
docs/en/flatbuffers.md:
##########
@@ -0,0 +1,134 @@
+# FlatBuffers messages
+
+[中文版](../cn/flatbuffers.md)
+
+bRPC provides optional IOBuf-backed FlatBuffers messages, builders, and service
+descriptors. The message-construction approach builds on
+[apache/brpc#3196](https://github.com/apache/brpc/pull/3196).
+
+This component does not register an `fb_rpc` transport or add FlatBuffers
+integration to `brpc::Channel` and `brpc::Server`. Service-generation and
+in-process dispatch tests are not network RPC or performance benchmarks.
+
+## Build
+
+FlatBuffers support is disabled by default. The message runtime needs only
+FlatBuffers headers; it does not link a FlatBuffers library. Tests need a 
`flatc`
+matching those headers. Keep upstream's generated version assertions intact:
+regenerate the header rather than weakening the assertion.
+
+For example, with GoogleTest sources installed under `/usr/src/googletest`:
+
+```sh
+cmake -S . -B build -DWITH_FLATBUFFERS=ON -DBUILD_UNIT_TESTS=ON \
+  -DBUILD_BRPC_TOOLS=OFF -DDOWNLOAD_GTEST=OFF \
+  -DBRPC_SYSTEM_GTEST_SOURCE_DIR=/usr/src/googletest
+cmake --build build --target brpc_flatbuffers_unittest -j6
+ctest --test-dir build -R '^brpc_flatbuffers_unittest$' --output-on-failure
+```
+
+For other installations set `FLATBUFFERS_INCLUDE_DIR`,
+`FLATBUFFERS_FLATC_EXECUTABLE`, and `BRPC_SYSTEM_GTEST_SOURCE_DIR` as needed.
+The project's usual test dependencies still apply.
+
+Make accepts `--with-flatbuffers` on `config_brpc.sh`; its tests accept

Review Comment:
   [replied by brpc-oncall robot] The Chinese version was rewritten to be more 
concise at chenBright's request (e.g. this paragraph and the Bzlmod/gRPC 
rationale were shortened, and the `flatc 25.2.10 emits fully qualified names` 
sentence was dropped), but the English original still has the longer wording. 
Unless you intend the two to diverge, please apply the same trimming here so 
docs/en and docs/cn stay in sync.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to