#bindings #protobuf #protobuf-example

app protobuf-example

Example use of Rust Protocol Buffers bindings

4 releases

new 4.31.0-rc.2 Apr 30, 2025
4.31.0-rc.1 Apr 18, 2025
4.31.0-beta1 Mar 6, 2025
4.30.0-beta1 Dec 18, 2024

#818 in Encoding

Download history 132/week @ 2025-03-05 7/week @ 2025-03-12 141/week @ 2025-04-16 4/week @ 2025-04-23

145 downloads per month

BSD-3-Clause

4KB

An example that demonstrates how to use the protobuf and protobuf_codegen crates together.

How to get a compatible version of protoc

The protoc binary that you use to generate code needs to have a version that exactly matches the version of the protobuf crate you are using. More specifically, if you are using Rust protobuf x.y.z then you need to use protoc y.z. See here for more details on our versioning scheme.

The easiest way to get ahold of protoc is to download a prebuilt binary from the matching release here. Just make sure protoc is on your $PATH when you run cargo.

Dependencies

~2MB
~38K SLoC