Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
25e73640
Unverified
Commit
25e73640
authored
Oct 28, 2025
by
Simo Lin
Committed by
GitHub
Oct 28, 2025
Browse files
[router] upgrade grpc dependency and py 3.13 3.14 support (#12284)
parent
0da9845e
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
33 deletions
+24
-33
.github/workflows/nightly-release-router.yml
.github/workflows/nightly-release-router.yml
+1
-1
.github/workflows/release-pypi-router.yml
.github/workflows/release-pypi-router.yml
+1
-1
sgl-router/Cargo.toml
sgl-router/Cargo.toml
+8
-7
sgl-router/build.rs
sgl-router/build.rs
+5
-24
sgl-router/pyproject.toml
sgl-router/pyproject.toml
+7
-0
sgl-router/src/grpc_client/sglang_scheduler.rs
sgl-router/src/grpc_client/sglang_scheduler.rs
+2
-0
No files found.
.github/workflows/nightly-release-router.yml
View file @
25e73640
...
@@ -57,7 +57,7 @@ jobs:
...
@@ -57,7 +57,7 @@ jobs:
-
name
:
Build package
-
name
:
Build package
uses
:
pypa/cibuildwheel@v2.21.3
uses
:
pypa/cibuildwheel@v2.21.3
env
:
env
:
CIBW_BUILD
:
"
cp38-manylinux_x86_64
cp39-manylinux_x86_64
cp310-manylinux_x86_64
cp311-manylinux_x86_64
cp312-manylinux_x86_64"
CIBW_BUILD
:
"
cp38-manylinux_x86_64
cp39-manylinux_x86_64
cp310-manylinux_x86_64
cp311-manylinux_x86_64
cp312-manylinux_x86_64
cp313-manylinux_x86_64
cp314-manylinux_x86_64
"
CIBW_BEFORE_ALL
:
|
CIBW_BEFORE_ALL
:
|
yum update -y && yum install -y openssl-devel wget unzip && \
yum update -y && yum install -y openssl-devel wget unzip && \
# Install latest protoc (v32.0) that supports proto3
# Install latest protoc (v32.0) that supports proto3
...
...
.github/workflows/release-pypi-router.yml
View file @
25e73640
...
@@ -45,7 +45,7 @@ jobs:
...
@@ -45,7 +45,7 @@ jobs:
-
name
:
Build package
-
name
:
Build package
uses
:
pypa/cibuildwheel@v2.21.3
uses
:
pypa/cibuildwheel@v2.21.3
env
:
env
:
CIBW_BUILD
:
"
cp38-manylinux_x86_64
cp39-manylinux_x86_64
cp310-manylinux_x86_64
cp311-manylinux_x86_64
cp312-manylinux_x86_64"
CIBW_BUILD
:
"
cp38-manylinux_x86_64
cp39-manylinux_x86_64
cp310-manylinux_x86_64
cp311-manylinux_x86_64
cp312-manylinux_x86_64
cp313-manylinux_x86_64
cp314-manylinux_x86_64
"
CIBW_BEFORE_ALL
:
|
CIBW_BEFORE_ALL
:
|
yum update -y && yum install -y openssl-devel wget unzip && \
yum update -y && yum install -y openssl-devel wget unzip && \
# Install latest protoc (v32.0) that supports proto3
# Install latest protoc (v32.0) that supports proto3
...
...
sgl-router/Cargo.toml
View file @
25e73640
...
@@ -36,7 +36,7 @@ rand = "0.9.2"
...
@@ -36,7 +36,7 @@ rand = "0.9.2"
reqwest
=
{
version
=
"0.12.8"
,
features
=
[
"stream"
,
"blocking"
,
"json"
,
"rustls-tls"
],
default-features
=
false
}
reqwest
=
{
version
=
"0.12.8"
,
features
=
[
"stream"
,
"blocking"
,
"json"
,
"rustls-tls"
],
default-features
=
false
}
futures-util
=
"0.3"
futures-util
=
"0.3"
futures
=
"0.3"
futures
=
"0.3"
pyo3
=
{
version
=
"0.2
5
.1"
,
features
=
["extension-module"]
}
pyo3
=
{
version
=
"0.2
7
.1"
,
features
=
["extension-module"]
}
dashmap
=
"6.1.0"
dashmap
=
"6.1.0"
blake3
=
"1.5"
blake3
=
"1.5"
http
=
"1.1.0"
http
=
"1.1.0"
...
@@ -58,7 +58,7 @@ rayon = "1.10"
...
@@ -58,7 +58,7 @@ rayon = "1.10"
thiserror
=
"2.0.12"
thiserror
=
"2.0.12"
regex
=
"1.10"
regex
=
"1.10"
url
=
"2.5.4"
url
=
"2.5.4"
validator
=
{
version
=
"0.
18
"
,
features
=
["derive"]
}
validator
=
{
version
=
"0.
20.0
"
,
features
=
["derive"]
}
tokio-stream
=
{
version
=
"0.1"
,
features
=
["sync"]
}
tokio-stream
=
{
version
=
"0.1"
,
features
=
["sync"]
}
anyhow
=
"1.0"
anyhow
=
"1.0"
tokenizers
=
{
version
=
"0.22.0"
}
tokenizers
=
{
version
=
"0.22.0"
}
...
@@ -82,17 +82,18 @@ rustpython-parser = "0.4.0"
...
@@ -82,17 +82,18 @@ rustpython-parser = "0.4.0"
num-traits
=
"0.2"
num-traits
=
"0.2"
# gRPC and Protobuf dependencies
# gRPC and Protobuf dependencies
tonic
=
{
version
=
"0.12"
,
features
=
[
"tls"
,
"gzip"
,
"transport"
]
}
tonic
=
{
version
=
"0.14.2"
,
features
=
[
"gzip"
,
"transport"
]
}
prost
=
"0.13"
prost
=
"0.14.1"
prost-types
=
"0.13"
prost-types
=
"0.14.1"
tonic-prost
=
"0.14.2"
deadpool
=
{
version
=
"0.12"
,
features
=
[
"managed"
,
"rt_tokio_1"
]
}
deadpool
=
{
version
=
"0.12"
,
features
=
[
"managed"
,
"rt_tokio_1"
]
}
backoff
=
{
version
=
"0.4"
,
features
=
["tokio"]
}
backoff
=
{
version
=
"0.4"
,
features
=
["tokio"]
}
strum
=
{
version
=
"0.26"
,
features
=
["derive"]
}
strum
=
{
version
=
"0.26"
,
features
=
["derive"]
}
once_cell
=
"1.21.3"
once_cell
=
"1.21.3"
[build-dependencies]
[build-dependencies]
tonic-build
=
"0.12"
tonic-
prost-
build
=
"0.1
4.
2"
prost-build
=
"0.1
3
"
prost-build
=
"0.1
4.1
"
[dev-dependencies]
[dev-dependencies]
criterion
=
{
version
=
"0.5"
,
features
=
["html_reports"]
}
criterion
=
{
version
=
"0.5"
,
features
=
["html_reports"]
}
...
...
sgl-router/build.rs
View file @
25e73640
...
@@ -2,34 +2,15 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
...
@@ -2,34 +2,15 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
// Only regenerate if the proto file changes
// Only regenerate if the proto file changes
println!
(
"cargo:rerun-if-changed=src/proto/sglang_scheduler.proto"
);
println!
(
"cargo:rerun-if-changed=src/proto/sglang_scheduler.proto"
);
// Configure protobuf compilation with custom settings
// Configure tonic-prost-build for gRPC code generation
let
config
=
prost_build
::
Config
::
new
();
tonic_prost_build
::
configure
()
// Skip serde for types that use prost_types::Struct
// These cause conflicts and we don't need serde for all generated types
// Configure tonic-build for gRPC code generation
tonic_build
::
configure
()
// Generate both client and server code
// Generate both client and server code
.build_server
(
true
)
.build_server
(
true
)
.build_client
(
true
)
.build_client
(
true
)
// A
dd protoc arguments for
proto3 optional
support
// A
llow
proto3 optional
fields
.protoc_arg
(
"--experimental_allow_proto3_optional"
)
.protoc_arg
(
"--experimental_allow_proto3_optional"
)
// Add a module-level attribute for documentation and clippy warnings
// Compile the proto file
.server_mod_attribute
(
.compile_protos
(
&
[
"src/proto/sglang_scheduler.proto"
],
&
[
"src/proto"
])
?
;
"sglang.grpc.scheduler"
,
"#[allow(unused, unused_qualifications, clippy::mixed_attributes_style)]"
,
)
.client_mod_attribute
(
"sglang.grpc.scheduler"
,
"#[allow(unused, unused_qualifications, clippy::mixed_attributes_style)]"
,
)
// Compile the proto file with the custom config
.compile_protos_with_config
(
config
,
&
[
"src/proto/sglang_scheduler.proto"
],
&
[
"src/proto"
],
)
?
;
println!
(
"cargo:warning=Protobuf compilation completed successfully"
);
println!
(
"cargo:warning=Protobuf compilation completed successfully"
);
...
...
sgl-router/pyproject.toml
View file @
25e73640
...
@@ -18,6 +18,13 @@ classifiers = [
...
@@ -18,6 +18,13 @@ classifiers = [
"Programming Language :: Python :: Implementation :: CPython"
,
"Programming Language :: Python :: Implementation :: CPython"
,
"Programming Language :: Rust"
,
"Programming Language :: Rust"
,
"Programming Language :: Python :: 3"
,
"Programming Language :: Python :: 3"
,
"Programming Language :: Python :: 3.8"
,
"Programming Language :: Python :: 3.9"
,
"Programming Language :: Python :: 3.10"
,
"Programming Language :: Python :: 3.11"
,
"Programming Language :: Python :: 3.12"
,
"Programming Language :: Python :: 3.13"
,
"Programming Language :: Python :: 3.14"
,
]
]
dependencies
=
[
dependencies
=
[
...
...
sgl-router/src/grpc_client/sglang_scheduler.rs
View file @
25e73640
...
@@ -20,7 +20,9 @@ use crate::protocols::{
...
@@ -20,7 +20,9 @@ use crate::protocols::{
};
};
// Include the generated protobuf code
// Include the generated protobuf code
#[allow(clippy::all)]
pub
mod
proto
{
pub
mod
proto
{
#![allow(clippy::all,
unused_qualifications)]
tonic
::
include_proto!
(
"sglang.grpc.scheduler"
);
tonic
::
include_proto!
(
"sglang.grpc.scheduler"
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment