Expand description
Build-time integration for buffa.
Use this crate in your build.rs to compile .proto files into Rust code
at build time. Parses .proto files into a FileDescriptorSet (via
protoc or buf), then uses buffa-codegen to generate Rust source.
§Example
ⓘ
// build.rs
fn main() {
buffa_build::Config::new()
.files(&["proto/my_service.proto"])
.includes(&["proto/"])
.compile()
.unwrap();
}§Requirements
By default, requires protoc on the system PATH (or set via the PROTOC
environment variable) — the same as prost-build and tonic-build.
If protoc is unavailable or outdated on your platform, buf can be
used instead — see Config::use_buf(). Alternatively, feed a
pre-compiled descriptor set via Config::descriptor_set().
Structs§
- Config
- Builder for configuring and running protobuf compilation.