File: build.rs

package info (click to toggle)
rust-prometheus 0.13.4-4
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 740 kB
  • sloc: makefile: 25
file content (19 lines) | stat: -rw-r--r-- 466 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Copyright 2019 TiKV Project Authors. Licensed under Apache-2.0.

#[cfg(feature = "gen")]
fn generate_protobuf_binding_file() {
    protobuf_codegen_pure::run(protobuf_codegen_pure::Args {
        out_dir: "proto",
        input: &["proto/proto_model.proto"],
        includes: &["proto"],
        ..Default::default()
    })
    .unwrap();
}

#[cfg(not(feature = "gen"))]
fn generate_protobuf_binding_file() {}

fn main() {
    generate_protobuf_binding_file()
}