16 lines
564 B
Rust
16 lines
564 B
Rust
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|
// Compile the protobuf files to OUT_DIR (default location for include_proto!)
|
|
tonic_build::configure()
|
|
.build_server(true)
|
|
.build_client(true)
|
|
.compile_protos(
|
|
&["../../proto/chainfire.proto", "../../proto/internal.proto"],
|
|
&["../../proto"],
|
|
)?;
|
|
|
|
// Tell cargo to rerun if proto files change
|
|
println!("cargo:rerun-if-changed=../../proto/chainfire.proto");
|
|
println!("cargo:rerun-if-changed=../../proto/internal.proto");
|
|
|
|
Ok(())
|
|
}
|