-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.rs
24 lines (24 loc) · 910 Bytes
/
build.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
fn main() -> Result<(), Box<dyn std::error::Error>> {
tonic_build::configure()
.file_descriptor_set_path("src/descriptor.bin")
.protoc_arg("--experimental_allow_proto3_optional")
.type_attribute(".", "#[derive(serde::Serialize, serde::Deserialize)]")
.type_attribute(
"scheduler.v2.AnnouncePeerRequest.request",
"#[allow(clippy::large_enum_variant)]",
)
.extern_path(".google.protobuf.Timestamp", "::prost_wkt_types::Timestamp")
.extern_path(".google.protobuf.Duration", "::prost_wkt_types::Duration")
.out_dir("src")
.compile(
&[
"proto/common.proto",
"proto/errordetails.proto",
"proto/dfdaemon.proto",
"proto/manager.proto",
"proto/scheduler.proto",
],
&["proto/"],
)?;
Ok(())
}