Skip to main content

configure

Function configure 

pub fn configure() -> RamaTtrpcProtoBuilder
Available on crate feature ttrpc only.
Expand description

Configure rama-ttrpc-build code generation, returning a RamaTtrpcProtoBuilder.

Use this instead of compile_protos when you need to set options, e.g. a custom output directory:

let out = std::path::PathBuf::from(std::env::var_os("OUT_DIR").unwrap()).join("ttrpc");
rama_ttrpc_build::configure()
    .with_out_dir(out)
    .compile_protos(&["proto/greeter.proto"], &["proto"])?;