prost-reflect
A protobuf library extending prost with reflection support and dynamic messages.
0.16.5
75M downloads/mo
#947 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 6 months
Nearly every release is documented
notes for 56 of 56 stable releases
Nothing withdrawn
no release was ever pulled
5 years old
57 releases · first in 2021
4 releases in the last 12 months
see the full history below
Release timeline
57 releases · Dec 2021 to Jul 2026Releases
latest 57-
0.16.509 Jul 2026Release notes
Open source →Fixed
- Fixed a performance regression in encoding of DynamicMessage (#200)
Release notes
Open source →Fixed
- Fixed a performance regression in encoding of DynamicMessage (#200)
-
0.16.424 May 2026Release notes
Open source →Fixed
- Fix proto3 default for is_packed when FieldOptions is present but packed is absent (#196)
Other
- Update logos to 0.16.0 #192
Release notes
Open source →Fixed
- Fix proto3 default for is_packed when FieldOptions is present but packed is absent (#196)
Other
- Update logos to 0.16.0 #192
-
0.16.301 Dec 2025 -
0.16.219 Sep 2025 -
0.16.101 Aug 2025 -
0.16.013 Jun 2025Release notes
Open source →Release notes
Open source → -
0.15.320 May 2025 -
0.15.219 Apr 2025Release notes
Open source →Changed
- The descriptors for well-known types returned by
DescriptorPool::global()have been updated to match the definitions in protobuf version 25.4. - The crate package now includes test files to allow consumers to run the tests.
- The descriptors for well-known types returned by
-
0.15.113 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.701 Mar 2025Release notes
Open source →Changed
- All type name domains are now permitted when serializing
google.protobuf.Anytypes in the JSON format. ([#148]).
- All type name domains are now permitted when serializing
-
0.14.606 Feb 2025 -
0.14.521 Jan 2025Release notes
Open source →Added
- Added the
print_message_fields_in_index_orderoption to the text format, which causes fields to be print in the order they are defined in the protofile. ([#140]).
- Added the
-
0.14.413 Jan 2025Release notes
Open source →Changed
- The descriptors for well known types are now distributed as Rust code instead of a binary protobuf file, to make auditing of the package easier ([# 138]).
-
0.14.303 Dec 2024Release notes
Open source →Added
- Added the
skip_default_fieldsoption to the text format, which has the same behaviour as the equivalent option for the JSON format ([#131]).
Fixed
- The text format now correct parses the full range of boolean values allowed by the spec ([#135]).
- Added the
-
0.14.208 Sep 2024Release notes
Open source →Fixed
- Fixed an issue with the name resolution changes in the previous release, causing some valid files to be rejected (protox#86)
-
0.14.102 Sep 2024Release notes
Open source →Fixed
- Fixed a case where resolution of names was less strict than protoc ([protox#82])
-
0.14.008 Jul 2024 -
0.13.103 Apr 2024Release notes
Open source →Fixed
- Fixed resolution of field types when the type name is the same as the field name ([#99])
-
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.529 Aug 2023Release notes
Open source →Added
- Added new APIs for getting and clearing message fields:
DynamicMessage::fieldsGets an iterator over all fields of this message.DynamicMessage::fields_mutGets an iterator returning mutable references to all fields of this message.DynamicMessage::take_fieldsClears all fields from the message and returns an iterator yielding the values.DynamicMessage::extensionsGets an iterator over all extension fields of this message.DynamicMessage::extensions_mutGets an iterator returning mutable references to all extension fields of this message.DynamicMessage::take_extensionsClears all extension fields from the message and returns an iterator yielding the values.DynamicMessage::take_fieldClears the value for the given field, and returns it.DynamicMessage::take_field_by_nameClears the value for the field with the given name, and returns it.DynamicMessage::take_field_by_numberClears the value for the field with the given number, and returns it.DynamicMessage::take_extensionClears the value for the given extension field and returns it.
- Added new APIs for inspecting unknown fields of a message.
DynamicMessage::unknown_fields()Gets an iterator over unknown fields for this message.DynamicMessage::take_unknown_fields()Clears all unknown fields from the message and returns an iterator yielding the values.UnknownFieldAn unknown field found when deserializing a protobuf message..
- Added new APIs for getting and clearing message fields:
-
0.11.428 Apr 2023Release notes
Open source →Changed
- Monomorphised some code in
DescriptorPool::add_*methods to reduce binary size. Thanks to [@srijs] for [#40] and [#41]. - Source code info is now omitted from the built-in descriptors for well-known types. This reduces the binary size by around 100KB.
- Monomorphised some code in
-
0.11.311 Apr 2023 -
0.11.209 Apr 2023Release notes
Open source →Changed
- Adjusted the
Debugimplementation forDescriptorErrorto be more concise and readable.
Fixed
- Fixed parsing of group fields from text format. The field name must now match the type name of the group field.
- Adjusted the
-
0.11.105 Apr 2023 -
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.320 Mar 2023Release notes
Open source →Fixed
- Fixed type resolution for double fields. Thanks to [@jackkleeman] for [#29]
-
0.10.217 Feb 2023 -
0.10.107 Jan 2023Release notes
Open source →Fixed
- The path for repeated extension options now includes the array index (for consistency with the output of protoc).
-
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.10.0-alpha.101 Jan 2023 pre-releaseNothing published for this version
-
0.9.214 Aug 2022Release notes
Open source →Added
- Added support for parsing and formatting dynamic messages using the text format. This functionality is enabled with the new
text_formatfeature flag. SeeDynamicMessage::parse_text_formatandDynamicMessage::to_text_format. - Added a
Displayimplementation forDynamicMessageandValuewhich uses the text format. This is available even when thetext_formatfeature is disabled. - Added new methods for setting dynamic message fields without panicking:
try_set_field,try_set_field_by_numberandtry_set_field_by_name - Added
Value::into_map_key()
- Added support for parsing and formatting dynamic messages using the text format. This functionality is enabled with the new
-
0.9.101 Aug 2022 -
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.129 May 2022Release notes
Open source →Added
- Added the
FileDescriptorAPI for inspecting individual protobuf files. - Added methods to
MessageDescriptorto get child messages, enums and extensions.
- Added the
-
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.714 Feb 2022Release notes
Open source →Added
- Added
file_descriptor_protomethods to descriptor types to access raw details about the file the object is defined in.
- Added
-
0.5.603 Feb 2022 -
0.5.501 Feb 2022Release notes
Open source →Added
- Added
MessageDescriptor::descriptor_protoand friends to get the rawprost_typesrepresentation of protobuf definitions.
- Added
-
0.5.401 Feb 2022Release notes
Open source →Changed
- Replace
chronodependency withtimefor parsing and formatting RFC 3339 timestamps when theserdefeature is enabled. This avoids security vulnerabilities RUSTSEC-2020-0071 and RUSTSEC-2020-0159 which are not yet patched inchrono.
- Replace
-
0.5.318 Jan 2022Release notes
Open source →Fixed
- The
Cardinalityenum is now exported. Thanks to [@benesch] for [#4].
- The
-
0.5.209 Jan 2022Release notes
Open source →Changed
DynamicMessagenow stores all fields (normal, extensions, and unknown) in the same storage, reducing its footprint from 48 bytes to 40.
-
0.5.105 Jan 2022Release notes
Open source →Added
- Added
DynamicMessage::get_field_mutand friends for in-place modification of messages.
- Added
-
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.502 Jan 2022 -
0.3.401 Jan 2022Release notes
Open source →Added
- Added
MessageDescriptor::map_entry_key_fieldandMessageDescriptor::map_entry_value_fieldto help with inspecting message types. - Added
Value::is_valid_for_fieldto validate that value types are compatible with message fields. DynamicMessage::set_valuenow asserts that the value type is compatible with the field type.
Fixed
- Fixed
FieldDescriptor::is_packedreturning true for non-repeated fields.
- Added
-
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
-
0.2.028 Dec 2021Release notes
Open source →Added
- Added support for serializing and deserializing with serde. By default the serialization format is the canonical JSON encoding.
-
0.1.026 Dec 2021Release notes
Open source →Added
- Initial release, including support for inspecting message types at runtime.