aion-proto-generated 0.31.0

Machine-generated tonic/prost gRPC stubs for Aion, isolated from the hand-written aion-proto crate so its relaxed lint policy lives in Cargo.toml [lints] rather than in-source #![allow].
Documentation
//! Build-time gRPC stub generation for the shared wire contract.

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let proto_files = [
        "proto/common.proto",
        "proto/events.proto",
        "proto/workflow.proto",
        "proto/worker.proto",
        "proto/deploy.proto",
    ];

    println!("cargo:rerun-if-changed=build.rs");
    println!("cargo:rerun-if-changed=proto");
    for proto in &proto_files {
        println!("cargo:rerun-if-changed={proto}");
    }

    let protoc = protoc_bin_vendored::protoc_bin_path()?;
    let mut config = tonic_prost_build::Config::new();
    config.protoc_executable(protoc);
    tonic_prost_build::configure()
        .message_attribute(".", "#[derive(serde::Serialize, serde::Deserialize)]")
        .enum_attribute(".", "#[derive(serde::Serialize, serde::Deserialize)]")
        .compile_with_config(config, &proto_files, &["proto"])?;

    Ok(())
}