prost-reflect-derive
A derive macro for prost-reflect to generate ReflectMessage implementations
0.16.1
14M downloads/mo
#2542 most downloaded on crates.io
andrewhickman/prost-reflect
What this package is like to depend on
Last release 1 months ago
09 Jul 2026
Release timing varies
gaps range from 8 days to 13 months
Nearly every release is documented
notes for 20 of 20 stable releases
Nothing withdrawn
no release was ever pulled
5 years old
20 releases · first in 2021
1 release in the last 12 months
see the full history below
Release timeline
20 releases · Dec 2021 to Jul 2026
2022
2023
2024
2025
2026
Releases
latest 20-
0.16.109 Jul 2026 -
0.16.013 Jun 2025Release notes
Open source → -
0.15.119 Apr 2025Release notes
Open source →Fixed
- The JSON deserializer now accepts messages with oneofs where multiple fields are set, but only one is non-null, to better conform to the specification. This does not apply to
google.protobuf.Valueorgoogle.protobuf.NullValue. - If the
deny_unknown_fieldsfield is set tofalsewhen deserializing from JSON, unknown enum fields will now be ignored, in addition to unknown fields. This matches the behaviour of this flag in other implementations.
- The JSON deserializer now accepts messages with oneofs where multiple fields are set, but only one is non-null, to better conform to the specification. This does not apply to
-
0.15.010 Apr 2025Release notes
Open source →Changed
- The minimum supported rust version is now 1.74.0.
Fixed
- Fixed an unused type parameter on
DescriptorPool::add_file_descriptor_protos. ([#150])
-
0.14.008 Jul 2024 -
0.13.007 Feb 2024Release notes
Open source →Changed
- The minimum supported rust version is now 1.70.0.
- Updated the miette dependency to version 7.0.0.
-
0.12.001 Sep 2023Release notes
Open source →Changed
- The minimum supported rust version is now 1.64.0.
- Updated to prost 0.12.0
- When adding files to a
DescriptorPool, the library now validates that all referenced types are contained within the dependency files (including files imported usingimport public). Fixes [#57].
-
0.11.027 Mar 2023Release notes
Open source →Added
- Added a global descriptor pool which can be fetched using
DescriptorPool::global(). By default it just contains well-known types, but additional files can be added usingDescriptorPool::decode_global_file_descriptor_set()andDescriptorPool::add_global_file_descriptor_proto(). ([#13]) - prost-reflect-derive Added the
file_descriptor_set_bytesattribute as an alternative todescriptor_pool, which automatically registers the file with the global pool. - prost-reflect-build Added
Builder::file_descriptor_pool_bytesto set thefile_descriptor_set_bytesderive attribute.
Changed
- Duplicate files are now always ignored when adding to a
DescriptorPool(previously, the code would skip files with identical contents, but now it skips any file with the same name). - prost-reflect-derive Update syn requirement from 1.0.84 to 2.0.3
- prost-reflect-build Breaking Renamed
Builder::file_descriptor_exprtoBuilder::descriptor_pool. - prost-reflect-build Breaking Removed the default behaviour of looking for the file descriptor under
crate::DESCRIPTOR_POOL. One ofdescriptor_poolorfile_descriptor_pool_bytesmust be set explicitly.
- Added a global descriptor pool which can be fetched using
-
0.10.004 Jan 2023Release notes
Open source →Added
- Added the
path()method to all descriptor types, which returns a path that can be used to get source code info by comparing againstLocation::path. - Added the
options()method to all descriptor types, which returns a message containing the options defined for the descriptor, including custom options. - The
uninterpreted_optionsfield of options is now used to populate options if it is present.- Note that if the
text-formatfeature flag is not enabled, then options set through theaggregate_valuefield will be ignored.
- Note that if the
- Added several new validation checks when constructing a
DescriptorPoolinstance. - Added new
file(),line()andcolumn()methods to get more context information about errors. - When the
miettefeature is enabled,DescriptorErrornow implementsDiagnostic. When source code is provided throughDescriptorError::with_source_code, and span information is provided inFileDescriptorProto::source_code_info, then the error will have labels annotating relevant portions of the source.
Changed
- The minimum supported rust version is now 1.60.0.
- Breaking: The
FileDescriptor::dependenciesnow returns all imported files, instead of just those imported withimport public. The newpublic_dependenciesmethod preserves the old behaviour ([#19]). - Breaking: The
reflect-well-known-typesfeature flag has been removed, and the functionality is now always available. - Updated the base64 dependency to version 0.20.0.
- Added the
-
0.9.030 Jul 2022Release notes
Open source →Added
- Added
MessageDescriptor::get_extension_by_full_name().
Changed
- Updated to prost 0.11.0
- When the
serdefeature is enabled, the functions inprost-typesfor parsing and formatting time types are now used. This removes thetimedependency. - The minimum supported rust version is now 1.56.0.
- Added
-
0.8.009 May 2022Release notes
Open source →Added
DescriptorPool(formerlyFileDescriptor) now supports adding individualFileDescriptorProtoinstances (#6).
Changed
- Breaking:
FileDescriptorhas been renamed toDescriptorPool. (The nameFileDescriptormay be used in a future release to provide an API for inspecting individual source files)FileDescriptor::newhas been renamed toDescriptorPool::from_file_descriptor_set.FileDescriptor::file_descriptor_sethas been replaced byDescriptorPool::file_descriptor_protosto allow for it containing multiple sets of descriptors.- The
parent_filemethod on all descriptor types has been renamed toparent_pool. - The
file_descriptorparameter of theReflectMessagederive macro has been renamed todescriptor_pool. - The default value of the descriptor pool expression for
prost-reflect-buildis changed fromcrate::FILE_DESCRIPTORtocrate::DESCRIPTOR_POOL.
-
0.7.003 Apr 2022 -
0.6.127 Feb 2022Release notes
Open source →Added
- The public dependencies
prost,prost-typesandbytesare now re-exported from the crate root.
- The public dependencies
-
0.6.020 Feb 2022Release notes
Open source →Added
- Added implementations of [
ReflectMessage] for the google well-known types inprost-types, behind a feature flagreflect-well-known-types.
Changed
- The minimum supported rust version is now 1.54.0.
- Added implementations of [
-
0.5.005 Jan 2022Release notes
Open source →Added
- Extension fields are now decoded from their byte representation
- Added APIs to get extensions for a given message.
Changed
DynamicMessage::get_extensionno longer returns an option.
-
0.4.004 Jan 2022Release notes
Open source →Added
- New helper method
DynamicMessage::decode. - New APIs to get reserved names and fields for messages and enums
- New descriptor APIs to inspect extension fields
- New dynamic message APIs to get and set extension fields
Changed
- Renamed
SerializeOptions::emit_unpopulated_fieldstoSerializeOptions::skip_default_fields(note the meaning is inverted as well!). DynamicMessage::{has_field,get_field,set_field,clear_field}now take a field descriptor instead of a number. Use the new_by_numbervariants for the old behavior.
Fixed
-
The library now passes the protobuf conformance tests. This uncovered a number of edge cases:
- Fixed unpacked fields not accepting packed bytes
- Unknown fields are now preserved and roundtripped.
- Fixed default value for enums with negative values
- When receiving multiple fields of a oneof in the byte representation, only the last is set.
- Trailing zeros (e.g.
10.00) are now accepted when parsing integers from the JSON representation. - Fixed handling of
nullin JSON deserialization. - Deserialization of
google.protobuf.NullValuenow accepts the"NULL_VALUE"string. - Deserialization of floats from JSON now validates the value is in range.
- Nonzero trailing bits are allowed when deserializing JSON bytes from base64.
- Serialization of
google.protobuf.FieldMaskfails if the path cannot be roundtripped through camelCase. google.protobuf.Durationuses a different number of trailing zeroes depending on the precision of the input.- JSON serialization of
google.protobuf.Timestampandgoogle.protobuf.Durationfails if it is outside the allowed range. - Duplicate oneof fields is now an error during JSON deserialization
- Extensions are roundtripped though JSON format
- New helper method
-
0.3.330 Dec 2021 -
0.3.229 Dec 2021Release notes
Open source →Added
- Builder methods on
SerializeOptionsandDeserializeOptionsare nowconst.
Fixed
- Fixed a case where serialization could produce invalid JSON.
- Builder methods on
-
0.3.129 Dec 2021 -
0.3.029 Dec 2021Release notes
Open source →Added
- Added
parent_message()method toMessageDescriptorandEnumDescriptorto support inspecting the structure of nested types. - Added
package_name()method toMessageDescriptor,EnumDescriptorandServiceDescriptorto determine which package they are defined in. - Added
ReflectMessagetrait for types which can identify themselves with aMessageDescriptor. - Added a derive macro which can be used as part of
prost_buildto generateReflectMessageimplementations.
Changed
- Renamed
merge_from_messagetotranscode_fromandto_messagetotranscode_to.
- Added