refactor: consolidate gRPC client into shared crate dependency (#18730)

This commit is contained in:
Simo Lin
2026-02-12 06:43:24 -08:00
committed by GitHub
parent 1b8f68af57
commit 2f283d8152
10 changed files with 29 additions and 2362 deletions
-16
View File
@@ -12,24 +12,8 @@ macro_rules! set_env {
fn main() -> Result<(), Box<dyn std::error::Error>> {
// Rebuild triggers
println!("cargo:rerun-if-changed=src/proto/sglang_scheduler.proto");
println!("cargo:rerun-if-changed=src/proto/vllm_engine.proto");
println!("cargo:rerun-if-changed=Cargo.toml");
// Compile protobuf files
tonic_prost_build::configure()
.build_server(true)
.build_client(true)
.type_attribute("GetModelInfoResponse", "#[derive(serde::Serialize)]")
.protoc_arg("--experimental_allow_proto3_optional")
.compile_protos(
&[
"src/proto/sglang_scheduler.proto",
"src/proto/vllm_engine.proto",
],
&["src/proto"],
)?;
// Set version info environment variables
let version = read_cargo_version().unwrap_or_else(|_| DEFAULT_VERSION.to_string());
let target = std::env::var("TARGET").unwrap_or_else(|_| get_rustc_host().unwrap_or_default());