Skip to main content

Module build_support

Module build_support 

Source
Expand description

Build-time helpers for compiling the bundled .proto definitions into Rust.

Enabled by the build feature (off by default). The sole public entry point is build_support::generate_protos, called from a consumer’s build.rs. Build-time helpers for compiling the bundled .proto definitions into Rust.

Two public items are defined here:

  • [generate_protos] — the single function consumers call from their build.rs. It discovers all .proto files shipped with this crate, compiles them with tonic-prost-build, and writes proto.rs into OUT_DIR.
  • [Config] — a builder that wraps tonic_prost_build::Builder and exposes attribute-injection methods for customising the generated code.

Private helpers live in the [file_utils] and [proto_rs] sub-modules.

Structs§

Config
Provides configuration options for the generated code.

Functions§

generate_protos
Compile the bundled .proto definitions and write a proto.rs into your crate’s OUT_DIR.