blob: 6cb990f65005619a9bc2dfd7d251fce5e5b1c8ee [file] [view]
The build time dependency crate for generating code for the official Google Rust
Protobuf implementation.
> **This crate is superseded by
> [google-protobuf-codegen](https://crates.io/crates/google-protobuf-codegen).**
> New development happens there; please migrate there to get the latest
> releases.
The code generated by this is expected to be used in conjunction with the
official [Protobuf crate](http://crates.io/crates/protobuf).
This is currently a beta release: the API is subject to change,
and there may be some rough edges, including missing documentation and features.
# 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](https://protobuf.dev/support/version-support/) 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](https://github.com/protocolbuffers/protobuf/releases).
Just make sure protoc is on your `$PATH` when you run `cargo`.