forked from BeechatNetworkSystemsLtd/Reticulum-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.rs
More file actions
37 lines (35 loc) · 1.14 KB
/
build.rs
File metadata and controls
37 lines (35 loc) · 1.14 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
29
30
31
32
33
34
35
36
37
use std::io::Result;
fn main() -> Result<()> {
println!("cargo:rerun-if-changed=proto/");
// Generate proto files for Kaonic
tonic_build::configure()
.type_attribute(
"ConfigurationRequest",
"#[derive(serde::Deserialize, serde::Serialize)]",
)
.type_attribute(
"RadioPhyConfigFSK",
"#[derive(serde::Deserialize, serde::Serialize)]",
)
.type_attribute(
"RadioPhyConfigOFDM",
"#[derive(serde::Deserialize, serde::Serialize)]",
)
.type_attribute(
"RadioPhyConfigQPSK",
"#[derive(serde::Deserialize, serde::Serialize)]",
)
.type_attribute(
"kaonic.ConfigurationRequest.phy_config",
"#[derive(serde::Deserialize, serde::Serialize)]",
)
.type_attribute(
"kaonic.ConfigurationRequest.phy_config",
"#[serde(tag = \"type\", content = \"data\")]",
)
.compile_protos(
&["proto/kaonic/kaonic.proto"],
&["proto/kaonic"], // The directory containing your proto files
)?;
Ok(())
}