prost-reflect-validate 0.0.0

protoc-gen-validate's validation using prost-reflect
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
static DIR: &str = "proto";

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let files = &["validate.proto"];
    files.iter().for_each(|f| {
        println!("cargo:rerun-if-changed={}/{}", DIR, f);
    });
    prost_reflect_build::Builder::new()
        .descriptor_pool("DESCRIPTOR_POOL")
        .compile_protos(files, &[DIR])?;
    Ok(())
}