[gRPC] Native gRPC server: proto + Rust crate scaffold + server args (#22736)
This commit is contained in:
@@ -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(())
|
||||
}
|
||||
Reference in New Issue
Block a user