PROST! is a Protocol Buffers implementation for the Rust Language. prost
generates simple, idiomatic Rust code from proto2
and proto3
files.
⚠️ Revert emission of rerun
commands
Version 0.14.1 reverts the emission of rerun
commands. Other than this change, it is identical to 0.14.0.
In version 0.14.0, prost-build
began emitting rerun
commands. While intended to improve build correctness, this change caused regressions for some users—for example, those generating protos
from an includes
directory. These edge cases are difficult to address reliably, so the change has been rolled back in 0.14.1.
For more details, see issue #1296.
Breaking changes
-
prost: Relax Message Debug trait bound (#1147)
BREAKING CHANGE:
trait Debug
was a supertrait oftrait Message
. This is no longer required byprost
. If your code relies ontrait Debug
being implemented for everyimpl Message
, you must now explicitly state that you require both Debug and Message. For example:where M: Debug + Message
-
prost: Remove prost-derive feature (#1247)
BREAKING CHANGE: Feature flag
prost-derive
is renamed toderive
. Please rename any usage ofprost-derive
feature in yourCargo.toml
. -
prost-build: Prevent repeated fields to be boxed (#1237)
BREAKING CHANGE: A repeated field that is manually marked as boxed was typed as
Vec<Box<T>>
. Those fields are now simply typed asVec<T>
to prevent double indirection. Theboxed
configuration is effectively ignored for repeated fields. -
prost-build: Make
type_name_domain
cumulative (#1228)BREAKING CHANGE: The configuration for domain names of messages is now cumulative. All calls to
prost_build::Config::type_name_domain
are now concatenated. The previous behavior was that only the arguments of the last call were used. If you do multiple calls to type_name_domain, you need to remove all but the last call to maintain the same behavior. -
prost-build: Derive Eq and Hash trait for messages where possible (#1175)
BREAKING CHANGE:
prost-build
will automatically derivetrait Eq
andtrait Hash
for types where all field support those as well. If you manuallyimpl Eq
and/orimpl Hash
for generated types, then you need to remove the manual implementation. If you usetype_attribute
toderive(Eq)
and/orderive(Hash)
, then you need to remove those.
Features
- prost-types: Implement conversion
Duration
to/fromchrono::TimeDelta
(#1236) - prost-build: Prepare for 2024 keyword
gen
(#1257)
Dependencies
- (deps) Update pulldown-cmark to 0.13 (#1259)
- (deps) update criterion requirement from 0.5 to 0.6 (#1280)
Documentation
- Update dead link LICENSE in
prost-types/README.md
(#1262)