Skip to content

Working example code using Bazel / rules_rust / prost for a gRPC server

License

Notifications You must be signed in to change notification settings

aran/rules_rust_prost_example

Repository files navigation

Bazel / rules_rust / prost example

10/02/2023

At the time of this writing the documentation for rules_rust isn't quite enough to get a working server. There are a few issues. This is working code. It consolidates a couple examples and includes a few fixes.

  • futures-core is required in WORKSPACE and the tonic_runtime rust_library_group as tonic uses it when generating streaming gRPCs.
  • This shows where to put everything, making clearer which code goes in WORKSPACE or not.
  • It keeps the example proto in its own module to make it clearer what depends on what (and what doesn't)
  • Makes it clearer that only one crates_repository is needed, where the docs use different crates_repository names and configurations in different sections.
  • An out-of-date patch for protoc-gen-prost is removed
  • Deprecated parameters are removed
  • Example grpcurl commands are included for each server method type in code/server/src/main.rs

Try:

bazel run //code/server

About

Working example code using Bazel / rules_rust / prost for a gRPC server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published