DEVELOPMENT ENVIRONMENT

~liljamo/emerwen

ref: 77b0f862c8fd398a04ec608db010160eca2f7d22 emerwen/emerwen-protocol/build.rs -rw-r--r-- 971 bytes
77b0f862Jonni Liljamo feat(master): implement webtomaster as ipc_server 5 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(())
}