fn main() -> Result<(), Box<dyn std::error::Error>> {
    let protoc_path = protoc_bin_vendored::protoc_bin_path()?;
    std::env::set_var("PROTOC", protoc_path);

    tonic_build::configure()
        .build_server(false)
        .build_client(true)
        .compile_protos(&["../../proto/chainfire.proto"], &["../../proto"])?;

    println!("cargo:rerun-if-changed=../../proto/chainfire.proto");
    Ok(())
}
