zebra-rpc 1.0.0-beta.46

A Zebra JSON Remote Procedure Call (JSON-RPC) interface
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! Compile proto files

fn main() -> Result<(), Box<dyn std::error::Error>> {
    #[cfg(feature = "indexer-rpcs")]
    {
        use std::{env, path::PathBuf};
        let out_dir = env::var("OUT_DIR").map(PathBuf::from);
        tonic_build::configure()
            .type_attribute(".", "#[derive(serde::Deserialize, serde::Serialize)]")
            .file_descriptor_set_path(out_dir.unwrap().join("indexer_descriptor.bin"))
            .compile_protos(&["proto/indexer.proto"], &[""])?;
    }

    Ok(())
}