rust-zero-gateway 0.1.0-alpha.1

Configuration-driven HTTP and gRPC transcoding gateway for rust-zero
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
fn main() -> Result<(), Box<dyn std::error::Error>> {
    std::env::set_var("PROTOC", protoc_bin_vendored::protoc_bin_path()?);
    tonic_build::configure()
        .build_server(true)
        .build_client(false)
        .file_descriptor_set_path(
            std::path::PathBuf::from(std::env::var("OUT_DIR")?).join("gateway.bin"),
        )
        .compile_protos(&["proto/transcoding.proto"], &["proto"])?;
    println!("cargo:rerun-if-changed=proto/transcoding.proto");
    Ok(())
}