[gRPC] Native gRPC server: proto + Rust crate scaffold + server args (#22736)

This commit is contained in:
Alex Nails
2026-04-20 12:39:35 +08:00
committed by GitHub
parent c304d0d64d
commit 10e17cc55e
9 changed files with 483 additions and 1 deletions
+15
View File
@@ -0,0 +1,15 @@
fn main() -> Result<(), Box<dyn std::error::Error>> {
let proto_path = "../../proto/sglang/runtime/v1/sglang.proto";
tonic_build::configure()
.build_server(true)
.build_client(false)
.file_descriptor_set_path(
std::path::PathBuf::from(std::env::var("OUT_DIR").unwrap())
.join("sglang_descriptor.bin"),
)
.compile_protos(&[proto_path], &["../../proto"])?;
println!("cargo:rerun-if-changed={}", proto_path);
Ok(())
}