-
-
Notifications
You must be signed in to change notification settings - Fork 92
Expand file tree
/
Copy pathbuild.rs
More file actions
30 lines (27 loc) · 1 KB
/
build.rs
File metadata and controls
30 lines (27 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
fn main() {
#[cfg(feature = "protobuf")]
{
rama_grpc_build::protobuf::compile_protos("proto/health.proto").unwrap();
println!("cargo::rerun-if-changed=proto");
}
#[cfg(feature = "opentelemetry")]
{
// Proto files vendored from https://github.com/open-telemetry/opentelemetry-proto
// tag: v1.5.0, commit: 2bd940b2b77c1ab57c27166af21384906da7bb2b
let mut config = prost_build::Config::new();
config.disable_comments(["."]);
// Use vendored protoc to avoid requiring system protoc installation
if let Ok(path) = protoc_bin_vendored::protoc_bin_path() {
config.protoc_executable(path);
}
config
.compile_protos(
&[
"proto/opentelemetry/proto/collector/trace/v1/trace_service.proto",
"proto/opentelemetry/proto/collector/metrics/v1/metrics_service.proto",
],
&["proto/"],
)
.unwrap();
}
}