fn main() -> Result<(), Box<dyn std::error::Error>> {
tonic_build::configure()
.include_file("mod.rs")
.type_attribute("Target", "#[derive(serde::Deserialize, serde::Serialize)]")
.type_attribute(
"Target.method",
"#[derive(serde::Deserialize, serde::Serialize)]",
)
.type_attribute(
"Target.MethodPing",
"#[derive(serde::Deserialize, serde::Serialize)]",
)
.type_attribute(
"Target.MethodGET",
"#[derive(serde::Deserialize, serde::Serialize)]",
)
.compile_protos(
&[
"../proto/workertomaster.proto",
"../proto/shared/target.proto",
],
&["../proto"],
)?;
Ok(())
}