Delete per-service proto/ directories. All 7 services now compile from the single canonical proto/ at workspace root. - trading_service: 5 protos + ml_training client -> ../../proto/ - ml_training_service: ml_training server + fxt_trading client -> ../../proto/ - broker_gateway_service: broker_gateway -> ../../proto/ - trading_agent_service: trading_agent + ml client -> ../../proto/ - data_acquisition_service: data_acquisition -> ../../proto/ - api_gateway: 8 proto compilations -> ../../proto/ - monitoring_service: keeps local proto (3 training RPCs only, deleted in Task 5) Added proto/fxt_trading.proto (fat-client proto, package foxhunt.tli) separate from proto/trading.proto (backend, package trading) since the API gateway needs both for protocol translation. Added unimplemented stubs for merged monitoring.proto RPCs: - trading_service: 3 training RPCs (served by monitoring_service) - api_gateway monitoring_proxy: 13 system health RPCs (Task 4) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
36 lines
1.4 KiB
Rust
36 lines
1.4 KiB
Rust
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|
// NOTE: Tonic 0.14+ uses tonic_prost_build instead of tonic_build
|
|
let config = tonic_prost_build::configure();
|
|
|
|
config
|
|
.clone()
|
|
.build_server(true)
|
|
.build_client(true)
|
|
.compile_well_known_types(true)
|
|
.extern_path(".google.protobuf", "::prost_types")
|
|
.type_attribute(".", "#[derive(serde::Serialize, serde::Deserialize)]")
|
|
// Suppress warnings in generated code
|
|
.server_mod_attribute(".", "#[allow(unused_qualifications)]")
|
|
.client_mod_attribute(".", "#[allow(unused_qualifications)]")
|
|
.compile_protos(&["../../proto/ml_training.proto"], &["../../proto"])?;
|
|
|
|
// Compile fat-client trading proto for BacktestingService (client only -- for validation pipeline)
|
|
config
|
|
.build_server(false)
|
|
.build_client(true)
|
|
.compile_well_known_types(true)
|
|
.extern_path(".google.protobuf", "::prost_types")
|
|
.type_attribute(".", "#[derive(serde::Serialize, serde::Deserialize)]")
|
|
.server_mod_attribute(".", "#[allow(unused_qualifications)]")
|
|
.client_mod_attribute(".", "#[allow(unused_qualifications)]")
|
|
.compile_protos(
|
|
&["../../proto/fxt_trading.proto"],
|
|
&["../../proto"],
|
|
)?;
|
|
|
|
println!("cargo:rerun-if-changed=../../proto/ml_training.proto");
|
|
println!("cargo:rerun-if-changed=../../proto/fxt_trading.proto");
|
|
|
|
Ok(())
|
|
}
|