SIGN IN SIGN UP

Protocol Buffers - Google's data interchange format

0 0 35 C++

Add support for proto_library with more than one srcs

If a proto_library has more than one srcs, we designate the first one as the primary (that file will be passed to rustc as the crate root). All other files will represent (internal) submodules of the crate.

In general, Rust users won't see which .proto file a message came from, they will only see a crate corresponding to the entire proto_library, and in it public submodules for all `package` statements in all .proto files in the proto_library sources. Therefore in this CL we reexport all messages from non primary sources into their corresponding public modules (= packages declared in their owning .proto files).

Besides the common case this CL also handles .proto files without package statement, and a subset of behaviors needed for public import functionality.

PiperOrigin-RevId: 549543321
M
Marcel Hlopko committed
3ced818640df9b30efd25faf34084d3339806766
Parent: 4f67e28
Committed by Copybara-Service <copybara-worker@google.com> on 7/20/2023, 7:35:54 AM