Skip to content

Commit

Permalink
fix: proto compiler call in api build script
Browse files Browse the repository at this point in the history
Add allow proto3 flag
  • Loading branch information
lennartkloock committed May 30, 2023
1 parent 87b4665 commit c91422f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions backend/api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,4 @@ serial_test = "2"

[build-dependencies]
tonic-build = "0"
prost-build = "0"
8 changes: 7 additions & 1 deletion backend/api/build.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
const PROTO_DIR: &str = "../../proto";

fn main() {
let mut config = prost_build::Config::new();

config.protoc_arg("--experimental_allow_proto3_optional");
config.bytes(["."]);

tonic_build::configure()
.compile(
.compile_with_config(
config,
&[
format!("{}/scuffle/events/ingest.proto", PROTO_DIR),
format!("{}/scuffle/backend/api.proto", PROTO_DIR),
Expand Down

0 comments on commit c91422f

Please sign in to comment.