3 releases

4.0.0-alpha.2 Aug 23, 2022

#2083 in Encoding

Download history 138/week @ 2023-12-14 150/week @ 2023-12-21 96/week @ 2023-12-28 159/week @ 2024-01-04 191/week @ 2024-01-11 144/week @ 2024-01-18 112/week @ 2024-01-25 300/week @ 2024-02-01 108/week @ 2024-02-08 295/week @ 2024-02-15 205/week @ 2024-02-22 176/week @ 2024-02-29 220/week @ 2024-03-07 142/week @ 2024-03-14 189/week @ 2024-03-21 269/week @ 2024-03-28

829 downloads per month
Used in 9 crates (3 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

~0.3–0.8MB
~19K SLoC