grpc: Add the experimental optional flag to protoc

The `optional` keyword was first removed, and then re-added again, and
then it was made into an experimental flag. Come on people, decide
already which one it is...
This commit is contained in:
Christian Decker 2022-11-11 14:34:46 +01:00
parent 00dc0f082e
commit 4f5ab638df

View File

@ -1,3 +1,7 @@
fn main() {
tonic_build::compile_protos("proto/node.proto").unwrap();
let builder = tonic_build::configure();
builder
.protoc_arg("--experimental_allow_proto3_optional")
.compile(&["proto/node.proto"], &["proto"])
.unwrap();
}