hyperflow-rs-models 0.1.3

Generated Rust models for Hyperflow, derived from Protocol Buffer definitions.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::path::PathBuf;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let rust_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
    
    let proto_dir = rust_dir.join("proto");
    let proto_file = proto_dir.join("hyperflow/core/v1/models.proto");
    
    tonic_build::configure()
        .build_server(false)
        .compile(
            &[proto_file.to_str().unwrap()],
            &[proto_dir.to_str().unwrap()],
        )?;
    Ok(())
}