flatbuffers/grpc
Casper c58ae94225
Add the file a symbol is declared in to Reflection (#6613)
* Add the file a symbol is declared in to Reflection

If we move a code-generator to depend on Reflection,
it may need to know which file something was declared in
to properly name generated files.

* Doc comments in reflection, and more precise tests

* Add --project-root flag to flatc, normalize declaraion_file to this root

* fix --project-root stuff

* posixpath

* fix scripts

* format

* rename --project-root to --bfbs-filenames

Also, make it optional, rather than defaulting to `./`, if its not
specified, then don't serialize the filenames.

* bfbs generation

* fix some tests

* uncomment a thing

* add  to project root directory conditionally

* fix

* git clang format

* Added help description and removed != nullptr

* "

* Remove accidental change to docs

* Remove accidental change to docs

* Pool strings

Co-authored-by: Casper Neo <cneo@google.com>
2021-06-17 11:50:04 -04:00
..
examples Add the file a symbol is declared in to Reflection (#6613) 2021-06-17 11:50:04 -04:00
flatbuffers-java-grpc avoiding more NoSuchMethod exceptions (#6671) 2021-06-03 14:18:45 -07:00
samples/greeter [grpc] Support latest version of grpc PoC (#6338) 2021-03-25 12:12:35 -07:00
src/compiler [C++/grpc] added hiding of unused variables in the generated code (#6677) 2021-06-06 17:40:56 +07:00
tests avoiding more NoSuchMethod exceptions (#6671) 2021-06-03 14:18:45 -07:00
BUILD.bazel [CMake] Renames BUILD files (#6457) 2021-02-11 10:16:57 -08:00
README.md Allow to run cpp tests under grpc/tests/ using bazel. (#6040) 2020-07-21 11:08:01 -07:00
boringssl.patch [grpc] Support latest version of grpc PoC (#6338) 2021-03-25 12:12:35 -07:00
build_grpc.sh [grpc] Support latest version of grpc PoC (#6338) 2021-03-25 12:12:35 -07:00
pom.xml avoiding more NoSuchMethod exceptions (#6671) 2021-06-03 14:18:45 -07:00

README.md

GRPC implementation and test

NOTE: files in src/ are shared with the GRPC project, and maintained there (any changes should be submitted to GRPC instead). These files are copied from GRPC, and work with both the Protobuf and FlatBuffers code generator.

tests/ contains a GRPC specific test, you need to have built and installed the GRPC libraries for this to compile. This test will build using the FLATBUFFERS_BUILD_GRPCTEST option to the main FlatBuffers CMake project.

Building Flatbuffers with gRPC

Linux

  1. Download, build and install gRPC. See instructions.
    • Lets say your gRPC clone is at /your/path/to/grpc_repo.
    • Install gRPC in a custom directory by running make install prefix=/your/path/to/grpc_repo/install.
  2. export GRPC_INSTALL_PATH=/your/path/to/grpc_repo/install
  3. export PROTOBUF_DOWNLOAD_PATH=/your/path/to/grpc_repo/third_party/protobuf
  4. mkdir build ; cd build
  5. cmake -DFLATBUFFERS_BUILD_GRPCTEST=ON -DGRPC_INSTALL_PATH=${GRPC_INSTALL_PATH} -DPROTOBUF_DOWNLOAD_PATH=${PROTOBUF_DOWNLOAD_PATH} ..
  6. make

For Bazel users:

$bazel test src/compiler/...

Running FlatBuffer gRPC tests

Linux

  1. ln -s ${GRPC_INSTALL_PATH}/lib/libgrpc++_unsecure.so.6 ${GRPC_INSTALL_PATH}/lib/libgrpc++_unsecure.so.1
  2. export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${GRPC_INSTALL_PATH}/lib
  3. make test ARGS=-V

For Bazel users:

$bazel test tests/...