Utility functions for generating Rust code from protobuf specifications.
Can use rust-protobuf and Prost.
The prost-codec feature uses Prost 0.14 and requires Rust 1.85 or later.
The grpcio-prost-codec feature uses the generator from grpcio-compiler and still targets Prost 0.11.
The default protobuf-codec feature cannot be combined with either Prost feature, because both
code paths define Builder::generate_files. Disable the default features when you use Prost:
[build-dependencies]
protobuf-build = { version = "0.16", default-features = false, features = ["prost-codec"] }For gRPC Prost code, use features = ["grpcio-prost-codec"] instead. It enables prost-codec itself.
Do not combine standalone Prost 0.14 generation and gRPC Prost 0.11 generation in one Cargo build.
Cargo merges features across the dependency graph. If one crate enables grpcio-prost-codec, all
crates use the Prost 0.11 generator. Their enum accessors then call the deprecated from_i32, and
builds that deny warnings fail.