Add protoc optionals arg

This commit is contained in:
Zane Schepke
2023-11-24 06:56:13 -05:00
parent 064624d8ec
commit acf9de0f74
2 changed files with 3 additions and 1 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
fn main() -> Result<(), Box<dyn std::error::Error>> {
const PROTO_PATH: &str = "proto/nymvpn-controller.proto";
tonic_build::configure().compile(&[PROTO_PATH], &["proto"])?;
tonic_build::configure().protoc_arg("--experimental_allow_proto3_optional")
.compile(&[PROTO_PATH], &["proto"])?;
println!("cargo:rerun-if-changed=proto");
Ok(())
}
+1
View File
@@ -1,6 +1,7 @@
fn main() -> Result<(), Box<dyn std::error::Error>> {
tonic_build::configure()
.build_server(false)
.protoc_arg(("--experimental_allow_proto3_optional"))
.compile(&["proto/nymvpn-server.proto"], &["proto"])?;
println!("cargo:rerun-if-changed=proto");
Ok(())