fundamentum-edge-proto 1.0.0

Bindings to Fundamentum Edge Daemon's gRPC API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
fn main() -> Result<(), Box<dyn std::error::Error>> {
    #[allow(unused_mut)]
    let mut builder = tonic_build::configure()
        .build_client(cfg!(feature = "client"))
        .build_server(cfg!(feature = "server"));

    #[cfg(feature = "reflection")]
    {
        use std::env;
        use std::path::PathBuf;
        let out_dir = PathBuf::from(env::var("OUT_DIR")?);
        builder = builder.file_descriptor_set_path(out_dir.join("descriptor.bin"));
    }

    builder.compile(&["./proto/all.proto"], &["./proto"])?;

    Ok(())
}