Prost version 0.14.0
PROST! is a Protocol Buffers implementation for the Rust Language. prost generates simple, idiomatic Rust code from proto2 and proto3 files.
Breaking changes
-
prost: Relax Message Debug trait bound (#1147)
BREAKING CHANGE:
trait Debugwas a supertrait oftrait Message. This is no longer required byprost. If your code relies ontrait Debugbeing 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-deriveis renamed toderive. Please rename any usage ofprost-derivefeature in yourCargo.toml. -
prost-build: Emit
reruncommands (#1140)BREAKING CHANGE: Previously
cargoassumed it had to rerunbuild.rsif any files in the project changed.prost-buildwill now emitreruncommands, which means only the explicitly marked files cause a rerun. If yourbuild.rsis dependent on any other file paths than those given toprost-build, then yourbuild.rsneeds to emitreruncommands as well. -
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. Theboxedconfiguration is effectively ignored for repeated fields. -
prost-build: Make
type_name_domaincumulative (#1228)BREAKING CHANGE: The configuration for domain names of messages is now cumulative. All calls to
prost_build::Config::type_name_domainare 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-buildwill automatically derivetrait Eqandtrait Hashfor types where all field support those as well. If you manuallyimpl Eqand/orimpl Hashfor generated types, then you need to remove the manual implementation. If you usetype_attributetoderive(Eq)and/orderive(Hash), then you need to remove those.
Features
- prost-types: Implement conversion
Durationto/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)
Styling
- Use DoubleEndedIterator::next_back (#1255)
- Fix typo (#1260)
Testing
- Run tests using edition 2024 (#1254)
- Run clippy with edition 2024 enabled (#1256)