Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
chore: Upgrade Rust to 1.90
Also update the edition on bindings and runtime examples to 2024. I
missed that when updating the edition on the main project.

Signed-off-by: Graham King <[email protected]>
  • Loading branch information
grahamking committed Sep 19, 2025
commit 7a9c49ae38f7f502c19f619cfb2df7fa7fdf29e6
4 changes: 2 additions & 2 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ rust-base:
ENV RUSTUP_HOME=/usr/local/rustup
ENV CARGO_HOME=/usr/local/cargo
ENV PATH=/usr/local/cargo/bin:$PATH
ENV RUST_VERSION=1.89.0
ENV RUST_VERSION=1.90.0
ENV RUSTARCH=x86_64-unknown-linux-gnu

RUN wget --tries=3 --waitretry=5 "https://static.rust-lang.org/rustup/archive/1.28.1/x86_64-unknown-linux-gnu/rustup-init" && \
echo "a3339fb004c3d0bb9862ba0bce001861fe5cbde9c10d16591eb3f39ee6cd3e7f *rustup-init" | sha256sum -c - && \
chmod +x rustup-init && \
./rustup-init -y --no-modify-path --profile minimal --default-toolchain 1.89.0 --default-host x86_64-unknown-linux-gnu && \
./rustup-init -y --no-modify-path --profile minimal --default-toolchain 1.90.0 --default-host x86_64-unknown-linux-gnu && \
rm rustup-init && \
chmod -R a+w $RUSTUP_HOME $CARGO_HOME

Expand Down
4 changes: 2 additions & 2 deletions container/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ ENV SCCACHE_BUCKET=${USE_SCCACHE:+${SCCACHE_BUCKET}} \
ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH \
RUST_VERSION=1.89.0
RUST_VERSION=1.90.0

# Define Rust target based on ARCH_ALT ARG
ARG RUSTARCH=${ARCH_ALT}-unknown-linux-gnu
Expand Down Expand Up @@ -367,4 +367,4 @@ RUN --mount=type=bind,source=./container/launch_message.txt,target=/opt/dynamo/l
echo "cat ~/.launch_screen" >> ~/.bashrc

ENTRYPOINT ["/opt/nvidia/nvidia_entrypoint.sh"]
CMD []
CMD []
2 changes: 1 addition & 1 deletion container/Dockerfile.sglang-wideep
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ARG ARCH_ALT="x86_64"
ARG NIXL_UCX_REF="v1.19.0"
ARG NIXL_TAG="0.5.0"
ARG CMAKE_VERSION="3.31.8"
ARG RUST_VERSION="1.89.0"
ARG RUST_VERSION="1.90.0"
ARG CARGO_BUILD_JOBS="16"

RUN apt-get update -y && \
Expand Down
2 changes: 1 addition & 1 deletion container/Dockerfile.trtllm_prebuilt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ ARG RUSTARCH=${ARCH_ALT}-unknown-linux-gnu
ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH \
RUST_VERSION=1.89.0
RUST_VERSION=1.90.0

# Install Rust using RUSTARCH derived from ARCH_ALT
RUN wget --tries=3 --waitretry=5 "https://static.rust-lang.org/rustup/archive/1.28.1/${RUSTARCH}/rustup-init" && \
Expand Down
2 changes: 1 addition & 1 deletion lib/bindings/python/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
[package]
name = "dynamo-py3"
version = "0.5.0"
edition = "2021"
edition = "2024"
authors = ["NVIDIA"]
license = "Apache-2.0"
homepage = "https://github.com/ai-dynamo/dynamo"
Expand Down
4 changes: 2 additions & 2 deletions lib/bindings/python/rust/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ where
let py_request = pythonize(py, &request)?;
let py_ctx = Py::new(py, Context::new(ctx_python.clone()))?;

let gen = if has_context {
let gen_result = if has_context {
// Pass context as a kwarg
let kwarg = PyDict::new(py);
kwarg.set_item("context", &py_ctx)?;
Expand All @@ -191,7 +191,7 @@ where
}?;

let locals = TaskLocals::new(event_loop.bind(py).clone());
pyo3_async_runtimes::tokio::into_stream_with_locals_v1(locals, gen.into_bound(py))
pyo3_async_runtimes::tokio::into_stream_with_locals_v1(locals, gen_result.into_bound(py))
})
})
.await??;
Expand Down
11 changes: 5 additions & 6 deletions lib/bindings/python/rust/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -735,13 +735,12 @@ impl Endpoint {
})?;

// Require an object/dict
if let Some(ref payload) = health_payload_json {
if !payload.is_object() {
if let Some(ref payload) = health_payload_json
&& !payload.is_object() {
return Err(pyo3::exceptions::PyTypeError::new_err(
"health_check_payload must be a JSON object (dict)",
));
}
}

let mut builder = self
.inner
Expand Down Expand Up @@ -1087,11 +1086,11 @@ async fn process_stream(
// Convert the response to a PyObject using Python's GIL
let annotated: RsAnnotated<serde_json::Value> = response;
let annotated: RsAnnotated<PyObject> = annotated.map_data(|data| {
let result = Python::with_gil(|py| match pythonize::pythonize(py, &data) {

Python::with_gil(|py| match pythonize::pythonize(py, &data) {
Ok(pyobj) => Ok(pyobj.into()),
Err(e) => Err(e.to_string()),
});
result
})
});

let is_error = annotated.is_error();
Expand Down
4 changes: 2 additions & 2 deletions lib/llm/src/mocker/sequence.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ fn create_unique_blocks_from_sequence(
.collect();

// Only push the partial block if tokens count isn't a multiple of block_size
if tokens.total_tokens() % block_size != 0 {
if !tokens.total_tokens().is_multiple_of(block_size) {
unique_blocks.push(match uuid {
Some(uuid) => UniqueBlock::PartialBlock(uuid),
None => UniqueBlock::default(),
Expand Down Expand Up @@ -258,7 +258,7 @@ impl ActiveSequence {
self.generated_tokens = self.generated_tokens.saturating_sub(1);

// Reverts to the last full block
if self.tokens.total_tokens() % self.block_size == 0 {
if self.tokens.total_tokens().is_multiple_of(self.block_size) {
self.unique_blocks.pop();
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/runtime/examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ resolver = "3"

[workspace.package]
version = "0.5.0"
edition = "2021"
edition = "2024"
authors = ["NVIDIA"]
license = "Apache-2.0"
homepage = "https://github.com/ai-dynamo/dynamo"
Expand Down
2 changes: 1 addition & 1 deletion lib/runtime/examples/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "1.89.0"
channel = "1.90.0"
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "1.89.0"
channel = "1.90.0"
Loading