fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut config = prost_build::Config::new();
config.protoc_arg("--experimental_allow_proto3_optional");
let with_transport = std::env::var_os("CARGO_FEATURE_TRANSPORT").is_some();
tonic_prost_build::configure()
.build_client(true)
.build_server(with_transport)
.build_transport(with_transport)
.compile_with_config(config, &["proto/sentrix.proto"], &["proto"])?;
println!("cargo:rerun-if-env-changed=CARGO_FEATURE_TRANSPORT");
Ok(())
}