Files
foxhunt/bin/fxt/build.rs
jgrusewski c112d34fec refactor: point fxt build.rs at proto/ root, delete fat-client protos
fxt now compiles from the same service protos as all backend services.
Deleted 8 fat-client protos (3,286 lines) from bin/fxt/proto/.
Updated include_proto! macros to use new package names (trading, ml,
config instead of foxhunt.tli, foxhunt.ml, foxhunt.config).
Added risk, data_acquisition, and config_service proto modules.
Fixed duplicate include_proto in agent.rs to use crate::proto.

Existing command implementations will be rewritten to use new proto
types in Task 6.

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

49 lines
1.8 KiB
Rust

fn main() -> Result<(), Box<dyn std::error::Error>> {
// proto/ at workspace root — single source of truth for all services.
// Note: fxt_trading.proto (package foxhunt.tli) is excluded — it is the
// legacy fat-client proto kept only for API Gateway backward compatibility.
let proto_root = "../../proto";
tonic_prost_build::configure()
.build_server(true) // Required for E2E test mock servers
.build_client(true)
.type_attribute(".", "#[derive(serde::Serialize, serde::Deserialize)]")
.server_mod_attribute(".", "#[allow(unused_qualifications)]")
.client_mod_attribute(".", "#[allow(unused_qualifications)]")
.protoc_arg("--experimental_allow_proto3_optional")
.compile_protos(
&[
&format!("{proto_root}/trading.proto"),
&format!("{proto_root}/health.proto"),
&format!("{proto_root}/ml.proto"),
&format!("{proto_root}/config.proto"),
&format!("{proto_root}/ml_training.proto"),
&format!("{proto_root}/trading_agent.proto"),
&format!("{proto_root}/broker_gateway.proto"),
&format!("{proto_root}/monitoring.proto"),
&format!("{proto_root}/risk.proto"),
&format!("{proto_root}/data_acquisition.proto"),
&format!("{proto_root}/config_service.proto"),
],
&[proto_root],
)?;
for proto in &[
"trading",
"health",
"ml",
"config",
"ml_training",
"trading_agent",
"broker_gateway",
"monitoring",
"risk",
"data_acquisition",
"config_service",
] {
println!("cargo:rerun-if-changed={proto_root}/{proto}.proto");
}
Ok(())
}