[router] Implement gRPC SGLangSchedulerClient (#9364)

This commit is contained in:
Chang Su
2025-08-19 16:44:11 -07:00
committed by GitHub
parent b45f753cba
commit 7638f5e44e
10 changed files with 388 additions and 8 deletions

View File

@@ -4,9 +4,11 @@ version = "0.0.0"
edition = "2021"
[features]
default = ["huggingface"]
default = ["huggingface", "grpc-client"]
huggingface = ["tokenizers"]
tiktoken = ["tiktoken-rs"]
grpc-client = []
grpc-server = []
[lib]
name = "sglang_router_rs"
@@ -52,6 +54,18 @@ anyhow = "1.0"
tokenizers = { version = "0.21.4", optional = true }
tiktoken-rs = { version = "0.5", optional = true }
# gRPC and Protobuf dependencies
tonic = { version = "0.12", features = ["tls", "gzip", "transport"] }
prost = "0.13"
prost-types = "0.13"
deadpool = { version = "0.12", features = ["managed", "rt_tokio_1"] }
backoff = { version = "0.4", features = ["tokio"] }
strum = { version = "0.26", features = ["derive"] }
[build-dependencies]
tonic-build = "0.12"
prost-build = "0.13"
[dev-dependencies]
criterion = { version = "0.5", features = ["html_reports"] }
tower = { version = "0.5", features = ["util"] }