Files
foxhunt/web-gateway/build.rs
jgrusewski 77ad1530cd feat(web-gateway): scaffold Axum REST gateway with all route modules
New web-gateway crate with:
- JWT auth middleware with claims extraction
- REST routes proxying to gRPC: trading, risk, ML, training, backtesting,
  performance, config, and hyperparameter tuning
- Proto compilation from shared tli/proto definitions
- AppState with lazy gRPC channels and WebSocket broadcast
- Axum server with CORS, tracing, and graceful shutdown

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 00:18:18 +01:00

29 lines
1.1 KiB
Rust

fn main() -> Result<(), Box<dyn std::error::Error>> {
tonic_prost_build::configure()
.build_server(false)
.build_client(true)
.type_attribute(".", "#[derive(serde::Serialize, serde::Deserialize)]")
.client_mod_attribute(".", "#[allow(unused_qualifications)]")
.protoc_arg("--experimental_allow_proto3_optional")
.compile_protos(
&[
"../tli/proto/trading.proto",
"../tli/proto/health.proto",
"../tli/proto/ml.proto",
"../tli/proto/config.proto",
"../tli/proto/ml_training.proto",
"../tli/proto/trading_agent.proto",
],
&["../tli/proto"],
)?;
println!("cargo:rerun-if-changed=../tli/proto/trading.proto");
println!("cargo:rerun-if-changed=../tli/proto/health.proto");
println!("cargo:rerun-if-changed=../tli/proto/ml.proto");
println!("cargo:rerun-if-changed=../tli/proto/config.proto");
println!("cargo:rerun-if-changed=../tli/proto/ml_training.proto");
println!("cargo:rerun-if-changed=../tli/proto/trading_agent.proto");
Ok(())
}