Skip to content

Commit 4acf515

Browse files
committed
Compatible with protoc that not enable proto3
1 parent 3b84f62 commit 4acf515

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

build.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
fn main() -> Result<(), Box<dyn std::error::Error>> {
2-
tonic_build::compile_protos("proto/command_v1.proto")?;
2+
tonic_build::configure()
3+
.protoc_arg("--experimental_allow_proto3_optional")
4+
.compile(&["proto/command_v1.proto"], &["proto"])?;
35
Ok(())
46
}

0 commit comments

Comments
 (0)