Dennis Shen | bca2f3c | 2024-03-06 22:01:24 +0000 | [diff] [blame] | 1 | use protobuf_codegen::Codegen; |
| 2 | |
| 3 | fn main() { |
| 4 | let proto_files = vec!["protos/aconfig_storage_metadata.proto"]; |
| 5 | |
| 6 | // tell cargo to only re-run the build script if any of the proto files has changed |
| 7 | for path in &proto_files { |
| 8 | println!("cargo:rerun-if-changed={}", path); |
| 9 | } |
| 10 | |
| 11 | Codegen::new() |
| 12 | .pure() |
| 13 | .include("protos") |
| 14 | .inputs(proto_files) |
| 15 | .cargo_out_dir("aconfig_storage_protos") |
| 16 | .run_from_script(); |
Dennis Shen | 45c94c6 | 2024-04-30 14:07:30 +0000 | [diff] [blame] | 17 | |
| 18 | let _ = cxx_build::bridge("src/lib.rs"); |
Dennis Shen | bca2f3c | 2024-03-06 22:01:24 +0000 | [diff] [blame] | 19 | } |