prostbuild
prost-build is a Rust library that generates Rust code from Protocol Buffer (.proto) files at build time as part of the Prost ecosystem. It is designed to be used alongside Prost, a Protocol Buffers implementation for Rust, and with tools like tonic for gRPC services. prost-build reads .proto definitions and produces Rust types representing messages, enums, and oneof constructs, with options to customize the generated code.
To use prost-build, developers add it as a build-dependency in Cargo.toml and provide a build script (build.rs)
The generated Rust source files are written to the crate’s OUT_DIR during compilation. The crate then includes
prost-build focuses on generating message types and related code, and does not itself emit gRPC service stubs.