eq-common 0.1.6

Celestia Equivalence Service shared types and traits
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
fn main() -> Result<(), Box<dyn std::error::Error>> {
    #[cfg(feature = "grpc")]
    {
        let code_gen_path = std::path::Path::new("src/generated");
        if !code_gen_path.exists() {
            std::fs::create_dir_all(code_gen_path)?;
        }
        tonic_build::configure()
            .build_server(true)
            .build_client(true)
            .out_dir(code_gen_path)
            .compile(&["proto/eqservice.proto"], &["proto/"])?;
        Ok(())
    }
    #[cfg(not(feature = "grpc"))]
    Ok(())
}