/rust-protobuf

Rust implementation of Google protocol buffers

Primary LanguageRustMIT LicenseMIT

rust-protobuf

GitHub Workflow Status crates.io version License

Protobuf implementation in Rust.

  • Written in pure rust
  • Generates rust code
  • Has runtime library support for generated code (Coded{Input|Output}Stream impl)
  • Supports both Protobuf versions 2 and 3
  • and more

Where is documentation

Documentation is moved to the crates.

(Note both versions 2 and 3 or rust-protobuf support both proto2 and proto3 syntax of .proto files.)

About versions and branches

Version 2

2.*.* is the latest stable version. 2.*.* versions follow semver conventions, including generated code: code generated with 2.*.* is compatible with newer 2.*.*.

Version 3

Compared to version 2, it has:

  • runtime reflection support
  • JSON and text format parsing and printing (based on reflection)
  • dynamic messages (messages which can be created using schema but without generated code)

Version 3 of rust-protobuf is mostly feature-complete, but to release it:

  • more testing needed
  • API need to be polished since breaking API is not semver-friendly

Tracking issue for rust-protobuf=3.

The crate needs help:

  • testing
  • documentation
  • examples to be used as documentation
  • feedback on API design
  • feedback on implementation
  • pull requests
  • a new maintainer

Changelog

See CHANGELOG.md for a list of changes and compatility issues between versions.

Related projects

  • prost — another protobuf implementation in Rust, also has gRPC implementation
  • quick-protobuf — alternative protobuf implementation in Rust
  • grpc-rs — another gRPC implementation for Rust
  • grpc-rust — incomplete implementation of gRPC based on this library