DEVELOPMENT ENVIRONMENT

~liljamo/emerwen

ref: 99bece8be8f11baece0ce10934feecb5d0f51863 emerwen/emerwen-protocol/build.rs -rw-r--r-- 971 bytes
99bece8bJonni Liljamo feat(protocol): init WebToMaster service 9 days ago
                                                                                
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_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)]",
        )
        .type_attribute("Worker", "#[derive(serde::Deserialize, serde::Serialize)]")
        .compile_protos(
            &[
                "../proto/workertomaster.proto",
                "../proto/webtomaster.proto",
                "../proto/shared/target.proto",
                "../proto/shared/worker.proto",
            ],
            &["../proto"],
        )?;
    Ok(())
}