protobuf-example 4.32.0-rc.1

Example use of Rust Protocol Buffers bindings
1
2
3
4
5
6
7
8
9
10
use protobuf_codegen::CodeGen;

fn main() {
    CodeGen::new()
        .inputs(["proto_example/foo.proto", "proto_example/bar/bar.proto"])
        .include("proto")
        .dependency(protobuf_well_known_types::get_dependency("protobuf_well_known_types"))
        .generate_and_compile()
        .unwrap();
}