-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathbuild.rs
More file actions
28 lines (28 loc) · 1.05 KB
/
build.rs
File metadata and controls
28 lines (28 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
fn main() -> Result<(), Box<dyn std::error::Error>> {
tonic_prost_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)]",
)
.type_attribute(
"scheduler.v2.AnnounceCachePeerRequest.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_protos(
&[
"proto/common.proto",
"proto/errordetails.proto",
"proto/dfdaemon.proto",
"proto/manager.proto",
"proto/scheduler.proto",
],
&["proto/"],
)?;
Ok(())
}