116 stable releases

Uses new Rust 2021

3.2.0 Sep 26, 2022
3.1.0 Jun 22, 2022
3.0.3 May 31, 2022
3.0.0-alpha.8 Feb 21, 2022
0.0.5 Nov 28, 2014

#23 in Network programming

Download history 115341/week @ 2022-06-14 130574/week @ 2022-06-21 141791/week @ 2022-06-28 336159/week @ 2022-07-05 150109/week @ 2022-07-12 153049/week @ 2022-07-19 159860/week @ 2022-07-26 164444/week @ 2022-08-02 163444/week @ 2022-08-09 149290/week @ 2022-08-16 136330/week @ 2022-08-23 149105/week @ 2022-08-30 165645/week @ 2022-09-06 153004/week @ 2022-09-13 165670/week @ 2022-09-20 143544/week @ 2022-09-27

651,074 downloads per month
Used in 754 crates (310 directly)

MIT license

1.5MB
29K SLoC

Library to read and write protocol buffers data

Features

This crate has one feature, which is with-bytes.

with-bytes enables protobuf crate support for bytes crate: when parsing bytes or strings from bytes::Bytes, protobuf will be able to reference the input instead of allocating subarrays.

Note, codegen also need to be instructed to generate Bytes or Chars for bytes or string protobuf types instead of default Vec<u8> or String, just enabling option on this crate is not enough.

See Customize struct in protobuf-codegen crate.

Accompanying crates

  • protobuf-json-mapping implements JSON parsing and serialization for protobuf messages.
  • protobuf-codegen can be used to rust code from .proto crates.
  • protoc-bin-vendored contains protoc command packed into the crate.
  • protobuf-parse contains .proto file parser. Rarely need to be used directly, but can be used for mechanical processing of .proto files.

Dependencies

~260–730KB
~16K SLoC