Add the `experimental_allow_proto3_optional` flag (#8282)

This commit is contained in:
Marek 2024-02-19 14:09:52 +01:00 committed by GitHub
parent fbddec3cb3
commit 96c0d42d74
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -3,6 +3,7 @@
fn main() -> Result<(), Box<dyn std::error::Error>> {
tonic_build::configure()
.btree_map(["."])
.protoc_arg("--experimental_allow_proto3_optional")
.type_attribute(".", "#[derive(serde::Deserialize, serde::Serialize)]")
.compile(&["proto/scanner.proto"], &[""])?;
Ok(())