mirror of
https://github.com/scsibug/nostr-rs-relay.git
synced 2024-11-22 00:59:07 -05:00
fix: allow older versions of protobuf-compiler to work
Add --experimental_allow_proto3_optional protoc arg in build configs fixes https://github.com/scsibug/nostr-rs-relay/issues/77
This commit is contained in:
parent
1daa25600d
commit
35a1973a46
8
build.rs
8
build.rs
|
@ -1,4 +1,10 @@
|
||||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
tonic_build::compile_protos("proto/nauthz.proto")?;
|
tonic_build::configure()
|
||||||
|
.build_server(false)
|
||||||
|
.protoc_arg("--experimental_allow_proto3_optional")
|
||||||
|
.compile(
|
||||||
|
&["proto/nauthz.proto"],
|
||||||
|
&["proto"],
|
||||||
|
)?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
tonic_build::compile_protos("../proto/nauthz.proto")?;
|
tonic_build::configure()
|
||||||
|
.build_server(false)
|
||||||
|
.protoc_arg("--experimental_allow_proto3_optional")
|
||||||
|
.compile(
|
||||||
|
&["../proto/nauthz.proto"],
|
||||||
|
&["../proto"],
|
||||||
|
)?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user