zcash-sync/build.rs

25 lines
616 B
Rust
Raw Permalink Normal View History

2021-06-17 09:56:20 -07:00
fn main() {
tonic_build::configure()
.out_dir("src/generated")
.compile(
2022-06-07 09:58:24 -07:00
&["proto/service.proto", "proto/compact_formats.proto"],
2021-06-17 09:56:20 -07:00
&["proto"],
)
.unwrap();
2022-06-08 05:48:16 -07:00
2023-04-25 17:18:24 -07:00
// create_c_bindings();
2022-06-08 05:48:16 -07:00
}
#[allow(dead_code)]
fn create_c_bindings() {
let crate_dir = std::env::var("CARGO_MANIFEST_DIR").unwrap();
2022-12-29 03:36:33 -08:00
let config = cbindgen::Config::from_root_or_default(".");
2022-06-08 05:48:16 -07:00
cbindgen::Builder::new()
.with_crate(crate_dir)
.with_config(config)
.generate()
.expect("Unable to generate bindings")
.write_to_file("binding.h");
2021-06-17 09:56:20 -07:00
}