Spaces:
Running
Running
File size: 1,100 Bytes
287a0bc |
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 31 32 33 34 35 36 37 |
fn main() -> Result<(), Box<dyn std::error::Error>> {
// Compile the protobuf files in the chromadb proto directory.
tonic_build::configure().compile(
&[
"../../idl/chromadb/proto/chroma.proto",
"../../idl/chromadb/proto/coordinator.proto",
],
&["../../idl/"],
)?;
// Compile the hnswlib bindings.
cc::Build::new()
.cpp(true)
.file("bindings.cpp")
.flag("-std=c++11")
.flag("-Ofast")
.flag("-DHAVE_CXX0X")
.flag("-fpic")
.flag("-ftree-vectorize")
.compile("bindings");
// Set a compile flag based on an environment variable that tells us if we should
// run the cluster tests
let run_cluster_tests_env_var = std::env::var("CHROMA_KUBERNETES_INTEGRATION");
match run_cluster_tests_env_var {
Ok(val) => {
let lowered = val.to_lowercase();
if lowered == "true" || lowered == "1" {
println!("cargo:rustc-cfg=CHROMA_KUBERNETES_INTEGRATION");
}
}
Err(_) => {}
}
Ok(())
}
|