Skip to main content

Crate build

Crate build 

Available on crate feature ttrpc only.
Expand description

ttRPC codegen support for Rama.

Compiles .proto service definitions into Rust ttRPC stubs (a service trait, a rama_ttrpc::Client impl and server dispatch) for use with rama-ttrpc. Drive it from a build.rs and include the output with rama_ttrpc::include_proto!.

The API mirrors rama-grpc-build: use compile_protos for the simple case, or configure for a RamaTtrpcProtoBuilder when you need options such as a custom output directory.

§Rama

Crate used by the end-user rama crate and rama crate authors alike.

Learn more about rama:

Structs§

RamaTtrpcProtoBuilder
Builder for configuring and generating ttRPC code from .proto files.
TtrpcServiceGenerator
A service generator that takes a service descriptor and generates Rust code for a ttrpc service.

Functions§

compile_protos
Compile .proto files into Rust ttRPC stubs during a Cargo build.
configure
Configure rama-ttrpc-build code generation, returning a RamaTtrpcProtoBuilder.