From f9c5351fb9bb03d6f24cc8b7289efe183c9c046f Mon Sep 17 00:00:00 2001 From: chanderlud Date: Mon, 11 Dec 2023 21:15:00 -0800 Subject: [PATCH] fix linux protoc error --- build.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build.rs b/build.rs index 02fce9d..5f2f8cc 100644 --- a/build.rs +++ b/build.rs @@ -1,6 +1,9 @@ use std::io::Result; fn main() -> Result<()> { - prost_build::compile_protos(&["src/items.proto"], &["src/"])?; + let mut config = prost_build::Config::new(); + config.protoc_arg("--experimental_allow_proto3_optional"); + config.compile_protos(&["src/items.proto"], &["src/"])?; + Ok(()) }