| 40 | } |
| 41 | |
| 42 | fn prost_config(descriptor_path: &Path, run_protoc: bool) -> prost_build::Config { |
| 43 | let mut config = prost_build::Config::new(); |
| 44 | config.file_descriptor_set_path(descriptor_path); |
| 45 | // If our cached descriptor is up-to-date, we don't need to run protoc. |
| 46 | // This is helpful so that users don't need to have protoc installed |
| 47 | // unless they're updating the protos. |
| 48 | if !run_protoc { |
| 49 | config.skip_protoc_run(); |
| 50 | } |
| 51 | config |
| 52 | } |
| 53 | if let Err(e) = |
| 54 | prost_config(&descriptor_path, run_protoc).compile_protos(&proto_files, &[root.as_path()]) |
| 55 | { |