- netboot-base.nix with SSH key auth - Launch scripts for node01/02/03 - Node configuration.nix and disko.nix - Nix modules for first-boot automation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
26 lines
1 KiB
Rust
26 lines
1 KiB
Rust
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|
// Set PROTOC environment variable to use vendored protoc
|
|
let protoc_path = protoc_bin_vendored::protoc_bin_path()?;
|
|
std::env::set_var("PROTOC", protoc_path);
|
|
|
|
// Compile the protobuf files to OUT_DIR
|
|
// This generates Rust code from the .proto definitions
|
|
tonic_build::configure()
|
|
.build_server(true) // Generate server traits
|
|
.build_client(true) // Generate client stubs
|
|
.compile_protos(
|
|
&[
|
|
"proto/remote_write.proto", // Prometheus remote write protocol
|
|
"proto/query.proto", // PromQL query API
|
|
"proto/admin.proto", // Admin/health endpoints
|
|
],
|
|
&["proto"], // Include path for proto files
|
|
)?;
|
|
|
|
// Tell cargo to rerun build.rs if proto files change
|
|
println!("cargo:rerun-if-changed=proto/remote_write.proto");
|
|
println!("cargo:rerun-if-changed=proto/query.proto");
|
|
println!("cargo:rerun-if-changed=proto/admin.proto");
|
|
|
|
Ok(())
|
|
}
|