DEVELOPMENT ENVIRONMENT

~liljamo/emerwen

ref: 91b99511153d9e5adb1ffba835cb0706a54676f0 emerwen/emerwen-protocol/build.rs -rw-r--r-- 971 bytes
91b99511Jonni Liljamo feat(master): change to protocol Worker type 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(())
}