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>
29 lines
1.1 KiB
Rust
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(())
|
|
}
|