zcash-sync/build.rs

28 lines
667 B
Rust
Raw 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
2022-06-09 04:28:37 -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();
let config = cbindgen::Config {
language: cbindgen::Language::C,
..Default::default()
};
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
}