1 use protobuf_codegen::CodeGen; 2 use std::env; 3 main()4fn main() { 5 let mut codegen = CodeGen::new(); 6 codegen 7 .protoc_path(env::var("PROTOC").expect("PROTOC should be set to the path to protoc")) 8 .protoc_gen_upb_minitable_path(env::var("PROTOC_GEN_UPB_MINITABLE").expect( 9 "PROTOC_GEN_UPB_MINITABLE should be set to the path to protoc-gen-upb_minitable", 10 )) 11 .inputs(["foo.proto", "bar/bar.proto"]) 12 .include("proto"); 13 codegen.compile().unwrap(); 14 } 15