dropbox / pb-jelly

A protobuf code generation framework for the Rust language developed at Dropbox.
Apache License 2.0
610 stars 25 forks source link

Implement read support for proto2 extensions #163

Closed goffrie closed 4 months ago

goffrie commented 4 months ago

Adds new codegen for messages with extension ranges defined, and generates extension fields as constants.

The syntax is m.get_extension(extensions::MY_EXTENSION), which can return Err if parsing fails. This is not super ergonomic.

Extensions are read-only for now.