aboutsummaryrefslogtreecommitdiff
path: root/tools/aconfig/aconfig_storage_file/build.rs
blob: e0ade2aba00365849b20e618f00f6ac7c0284a04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use protobuf_codegen::Codegen;

fn main() {
    let proto_files = vec!["protos/aconfig_storage_metadata.proto"];

    // tell cargo to only re-run the build script if any of the proto files has changed
    for path in &proto_files {
        println!("cargo:rerun-if-changed={}", path);
    }

    Codegen::new()
        .pure()
        .include("protos")
        .inputs(proto_files)
        .cargo_out_dir("aconfig_storage_protos")
        .run_from_script();

    let _ = cxx_build::bridge("src/lib.rs");
}