Skip to content

Releases: tokio-rs/prost

v0.4.0

13 Jun 05:08
Compare
Choose a tag to compare

PROST! is a Protocol Buffers implementation for the Rust Language. prost generates simple, idiomatic Rust code from proto2 and proto3 files.

prost 0.4.0 contains new features, bug-fixes, and one breaking change since
0.3.0:

  • @briansmith cleaned up the project dependencies and build scripts, resulting
    in faster and more robust builds for all prost users.
  • @kestred added tag inference on fields in types which derive Message.
    Tag inference reduces the number annotations necessary when manually writing
    message structs.
  • @warrenfalk added logic to strip the enum name from enum
    variants which include the enum name as a prefix. This style is common with
    Protobuf (since it's heavily tied to C++ name resolution), however it's
    non-idiomatic in Rust. To restore the previous behavior a new Config option is
    provided: retain_enum_prefix. This is a breaking change.
  • @danburkert added helper methods for working with length delimiters
    independently of message encoding and decoding.
  • And many more bug fixes.

Many thanks to the generous contributors who have helped out since 0.3.0:

  • Brian Smith
  • Dan Burkert
  • Gergely Nagy
  • Ivan Mironov
  • Kevin Stenerson
  • Warren Falk
  • YetAnotherMinion
  • hcpl

v0.3.0

29 Jan 02:34
Compare
Choose a tag to compare

PROST! is a Protocol Buffers implementation for the Rust Language. prost generates simple, idiomatic Rust code from proto2 and proto3 files.

prost 0.3.0 contains new features, bug-fixes, and one breaking change since 0.2.0:

  • @vorner added an important new feature to prost-build which allows custom attributes to be added to generated types. This allows applications to derive traits for generated types, such as SerDe support.
  • @vorner changed the Debug implementation for enumeration fields to be more helpful.
  • The prost_build::ServiceGenerator and prost_build::Config APIs have been changed to take &mut self instead of &self in order to simplify writing stateful service generators.

Many thanks to the wonderful contributors who have pitched-in since 0.2.0:

  • Dan Burkert
  • Fabrice Desré
  • Michal 'vorner' Vaner
  • Oliver Gould

v0.2.0

10 Sep 19:46
Compare
Choose a tag to compare

PROST! is a Protocol Buffers implementation for the Rust Language. prost generates simple, idiomatic Rust code from proto2 and proto3 files.

prost 0.2.0 includes many improvements over the previous version, including:

  • The prost-codegen crate has been removed, and its functionality has been combined into prost-build.
  • A new crate, prost-types, containing Protobuf well-known types has been added. The code generator will automatically use prost-types when well-known types are encountered during .proto.rs code generation.
  • Field accessors for proto2 optional fields and enum fields have been made more ergonomic.
  • prost-build has a new builder API (prost_build::Config), which can be used to specify custom code generation options. Current options include:
    • Using BTreeMap instead of HashMap for map fields.
    • Custom code generation for protobuf service definitions.
  • New prost-specific error types, prost::EncodeError and prost::DecodeError for encoding and decoding results.
  • The prost::Message trait has been made more flexible, and more ergonomic.
  • varint encoding and decoding has been optimized, see the following commit messages for results:
  • Default values are now preserved during code generation (bugfix).
  • New Message::clear method.