Add protoc optionals arg
This commit is contained in:
@@ -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,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(())
|
||||
|
||||
Reference in New Issue
Block a user