commit | 7f751cdddfedeeb74eeb335a63921ece0c36a8f3 | [log] [tgz] |
---|---|---|
author | freeformstu <103592567+freeformstu@users.noreply.github.com> | Wed Jul 05 07:20:52 2023 -0700 |
committer | GitHub <noreply@github.com> | Wed Jul 05 15:20:52 2023 +0100 |
tree | e8acd94aeb276f3feaa49be33126efd7e95fcfea | |
parent | 6118c81f2b04abe96e3aee0e4ea6b4048d0fefa7 [diff] |
Consolidate rust_prost_library and fix extension-only proto generation. (#2047) This PR consolidates rust_prost_library and rust_tonic_library into one rule; `rust_prost_library`. `rust_prost_library` will generate tonic services if you provide a `tonic_plugin` in the toolchain definition. If you do not provide that plugin and you try to build a proto with services, it will print a warning that you should add a `tonic_plugin`. This PR also handles extension-only proto files. Prost does not generate a file if there are no messages, enums, or services and it appears that Prost doesn't even support proto2 extensions. So to work around this issue, protoc_wrapper will generate an empty `.rs` file in the case that there are only extensions defined in a file. Closes: #2046
This repository provides rules for building Rust projects with Bazel.
General discussions and announcements take place in the GitHub Discussions, but there are additional places where community members gather to discuss rules_rust
.
Please refer to the full documentation.