osrm-backend/grpc
Siarhei Fedartsou 0f6aab9da6 Squashed 'third_party/flatbuffers/' content from commit 595bf0007
git-subtree-dir: third_party/flatbuffers
git-subtree-split: 595bf0007ab1929570c7671f091313c8fc20644e
2024-06-22 13:33:34 +02:00
..
examples Squashed 'third_party/flatbuffers/' content from commit 595bf0007 2024-06-22 13:33:34 +02:00
flatbuffers-java-grpc Squashed 'third_party/flatbuffers/' content from commit 595bf0007 2024-06-22 13:33:34 +02:00
samples/greeter Squashed 'third_party/flatbuffers/' content from commit 595bf0007 2024-06-22 13:33:34 +02:00
src/compiler Squashed 'third_party/flatbuffers/' content from commit 595bf0007 2024-06-22 13:33:34 +02:00
tests Squashed 'third_party/flatbuffers/' content from commit 595bf0007 2024-06-22 13:33:34 +02:00
boringssl.patch Squashed 'third_party/flatbuffers/' content from commit 595bf0007 2024-06-22 13:33:34 +02:00
build_grpc_with_cxx14.patch Squashed 'third_party/flatbuffers/' content from commit 595bf0007 2024-06-22 13:33:34 +02:00
build_grpc.sh Squashed 'third_party/flatbuffers/' content from commit 595bf0007 2024-06-22 13:33:34 +02:00
BUILD.bazel Squashed 'third_party/flatbuffers/' content from commit 595bf0007 2024-06-22 13:33:34 +02:00
pom.xml Squashed 'third_party/flatbuffers/' content from commit 595bf0007 2024-06-22 13:33:34 +02:00
README.md Squashed 'third_party/flatbuffers/' content from commit 595bf0007 2024-06-22 13:33:34 +02:00

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. export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${GRPC_INSTALL_PATH}/lib
  2. make test ARGS=-V

For Bazel users:

$bazel test tests/...