Files
foxhunt/bin/fxt/build.rs
jgrusewski 06cf6bf39e feat(fxt): add 'fxt train monitor' subcommand with live TUI
Adds a new CLI subcommand that connects to the monitoring service via
gRPC to display live training metrics. Supports single-snapshot mode
(--once), model filtering (--model), and configurable streaming
interval. Renders per-model epoch/loss table, GPU telemetry, hyperopt
progress, and health counters.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 21:41:54 +01:00

42 lines
1.7 KiB
Rust

// use prost_build as _; // Not directly used
fn main() -> Result<(), Box<dyn std::error::Error>> {
// Configure tonic-prost-build for proto compilation (Tonic 0.14+)
// Note: Server code enabled for E2E tests (mock gRPC servers)
tonic_prost_build::configure()
.build_server(true) // Required for E2E test mock servers
.build_client(true)
// Force correct protobuf attributes for all messages
.type_attribute(".", "#[derive(serde::Serialize, serde::Deserialize)]")
// Suppress warnings in generated code
.server_mod_attribute(".", "#[allow(unused_qualifications)]")
.client_mod_attribute(".", "#[allow(unused_qualifications)]")
// Enable proper protobuf derives
.protoc_arg("--experimental_allow_proto3_optional")
.compile_protos(
&[
"proto/trading.proto",
"proto/health.proto",
"proto/ml.proto",
"proto/config.proto",
"proto/ml_training.proto",
"proto/trading_agent.proto",
"proto/broker_gateway.proto",
"proto/monitoring.proto",
],
&["proto"],
)?;
// Tell cargo to recompile if proto files change
println!("cargo:rerun-if-changed=proto/trading.proto");
println!("cargo:rerun-if-changed=proto/health.proto");
println!("cargo:rerun-if-changed=proto/ml.proto");
println!("cargo:rerun-if-changed=proto/config.proto");
println!("cargo:rerun-if-changed=proto/ml_training.proto");
println!("cargo:rerun-if-changed=proto/trading_agent.proto");
println!("cargo:rerun-if-changed=proto/broker_gateway.proto");
println!("cargo:rerun-if-changed=proto/monitoring.proto");
Ok(())
}