Skip to content

Commit c3f6ec0

Browse files
grahamkingJason Zhou
authored andcommitted
chore: Rust to 1.89 and edition 2024 (#2659)
Signed-off-by: Jason Zhou <jasonzho@jasonzho-mlt.client.nvidia.com>
1 parent 5f72551 commit c3f6ec0

File tree

199 files changed

+1120
-1120
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

199 files changed

+1120
-1120
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ resolver = "3"
1818

1919
[workspace.package]
2020
version = "0.4.1"
21-
edition = "2021"
21+
edition = "2024"
2222
description = "Dynamo Inference Framework"
2323
authors = ["NVIDIA Inc. <sw-dl-dynamo@nvidia.com>"]
2424
license = "Apache-2.0"

Earthfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,13 @@ rust-base:
9191
ENV RUSTUP_HOME=/usr/local/rustup
9292
ENV CARGO_HOME=/usr/local/cargo
9393
ENV PATH=/usr/local/cargo/bin:$PATH
94-
ENV RUST_VERSION=1.87.0
94+
ENV RUST_VERSION=1.89.0
9595
ENV RUSTARCH=x86_64-unknown-linux-gnu
9696

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

components/metrics/src/bin/mock_worker.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,25 @@
1414
// limitations under the License.
1515

1616
use dynamo_llm::kv_router::{
17+
KV_HIT_RATE_SUBJECT,
1718
protocols::{ForwardPassMetrics, KvStats, WorkerStats},
1819
scheduler::KVHitRateEvent,
19-
KV_HIT_RATE_SUBJECT,
2020
};
2121
use dynamo_runtime::{
22-
component::{service::EndpointStats, Namespace},
22+
DistributedRuntime, Result, Runtime, Worker,
23+
component::{Namespace, service::EndpointStats},
2324
logging,
2425
pipeline::{
25-
async_trait, network::Ingress, AsyncEngine, AsyncEngineContextProvider, Error, ManyOut,
26-
ResponseStream, SingleIn,
26+
AsyncEngine, AsyncEngineContextProvider, Error, ManyOut, ResponseStream, SingleIn,
27+
async_trait, network::Ingress,
2728
},
2829
protocols::annotated::Annotated,
2930
stream,
3031
traits::events::EventPublisher,
31-
DistributedRuntime, Result, Runtime, Worker,
3232
};
3333
use rand::Rng;
3434
use std::sync::Arc;
35-
use tokio::time::{interval, Duration};
35+
use tokio::time::{Duration, interval};
3636

3737
fn main() -> Result<()> {
3838
logging::init();

components/metrics/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@
7676
//! Ok(())
7777
//! }
7878
79-
use axum::{routing::get, Router};
80-
use prometheus::{register_counter_vec, register_gauge_vec, Encoder, TextEncoder};
79+
use axum::{Router, routing::get};
80+
use prometheus::{Encoder, TextEncoder, register_counter_vec, register_gauge_vec};
8181
use reqwest::Client;
8282
use serde::{Deserialize, Serialize};
8383
use std::net::SocketAddr;
@@ -88,7 +88,7 @@ use dynamo_llm::kv_router::scoring::Endpoint;
8888
use dynamo_llm::kv_router::scoring::ProcessedEndpoints;
8989

9090
use dynamo_runtime::{
91-
distributed::Component, error, service::EndpointInfo, utils::Duration, Result,
91+
Result, distributed::Component, error, service::EndpointInfo, utils::Duration,
9292
};
9393

9494
/// Configuration for metrics collection mode

components/metrics/src/main.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,20 @@
2727
//! - ISL Blocks: Cumulative count of total blocks in all KV hit rate events
2828
//! - Overlap Blocks: Cumulative count of blocks that were already in the KV cache
2929
use clap::Parser;
30-
use dynamo_llm::kv_router::scheduler::KVHitRateEvent;
3130
use dynamo_llm::kv_router::KV_HIT_RATE_SUBJECT;
31+
use dynamo_llm::kv_router::scheduler::KVHitRateEvent;
3232
use dynamo_runtime::{
33-
error, logging,
33+
DistributedRuntime, ErrorContext, Result, Runtime, Worker, error, logging,
3434
traits::events::{EventPublisher, EventSubscriber},
3535
utils::{Duration, Instant},
36-
DistributedRuntime, ErrorContext, Result, Runtime, Worker,
3736
};
3837
use futures::stream::StreamExt;
3938
use std::sync::Arc;
4039

4140
// Import from our library
4241
use metrics::{
43-
collect_endpoints, extract_metrics, postprocess_metrics, LLMWorkerLoadCapacityConfig,
44-
MetricsMode, PrometheusMetricsCollector,
42+
LLMWorkerLoadCapacityConfig, MetricsMode, PrometheusMetricsCollector, collect_endpoints,
43+
extract_metrics, postprocess_metrics,
4544
};
4645

4746
/// CLI arguments for the metrics application
@@ -274,7 +273,7 @@ mod tests {
274273

275274
#[test]
276275
fn test_namespace_from_env() {
277-
env::set_var("DYN_NAMESPACE", "test-namespace");
276+
unsafe { env::set_var("DYN_NAMESPACE", "test-namespace") };
278277
let args = Args::parse_from(["count", "--component", "comp", "--endpoint", "end"]);
279278
assert_eq!(args.namespace, "test-namespace");
280279
}

components/router/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ use std::sync::Arc;
2626
use clap::Parser;
2727

2828
use dynamo_llm::kv_router::{
29+
KvRouter, WorkerSelector,
2930
protocols::WorkerSelectionResult,
3031
scheduler::{DefaultWorkerSelector, KvSchedulerError, SchedulingRequest},
31-
KvRouter, WorkerSelector,
3232
};
3333
use dynamo_llm::local_model::runtime_config::ModelRuntimeConfig;
3434
use dynamo_runtime::{
35-
logging, pipeline::network::Ingress, DistributedRuntime, Result, Runtime, Worker,
35+
DistributedRuntime, Result, Runtime, Worker, logging, pipeline::network::Ingress,
3636
};
3737

3838
#[derive(Parser)]

container/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
5353
ENV RUSTUP_HOME=/usr/local/rustup \
5454
CARGO_HOME=/usr/local/cargo \
5555
PATH=/usr/local/cargo/bin:$PATH \
56-
RUST_VERSION=1.87.0
56+
RUST_VERSION=1.89.0
5757

5858
WORKDIR /opt/dynamo
5959

container/Dockerfile.kvbm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ RUN apt update -y && \
220220
ENV RUSTUP_HOME=/usr/local/rustup \
221221
CARGO_HOME=/usr/local/cargo \
222222
PATH=/usr/local/cargo/bin:$PATH \
223-
RUST_VERSION=1.87.0
223+
RUST_VERSION=1.89.0
224224

225225
# Define Rust target based on ARCH_ALT ARG
226226
ARG RUSTARCH=${ARCH_ALT}-unknown-linux-gnu

container/Dockerfile.sglang

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ RUN apt update -y && \
212212
ENV RUSTUP_HOME=/usr/local/rustup \
213213
CARGO_HOME=/usr/local/cargo \
214214
PATH=/usr/local/cargo/bin:$PATH \
215-
RUST_VERSION=1.87.0
215+
RUST_VERSION=1.89.0
216216

217217
# Define Rust target based on ARCH_ALT ARG
218218
ARG RUSTARCH=${ARCH_ALT}-unknown-linux-gnu

container/Dockerfile.sglang-wideep

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,5 @@
11
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
3-
#
4-
# Licensed under the Apache License, Version 2.0 (the "License");
5-
# you may not use this file except in compliance with the License.
6-
# You may obtain a copy of the License at
7-
#
8-
# http://www.apache.org/licenses/LICENSE-2.0
9-
#
10-
# Unless required by applicable law or agreed to in writing, software
11-
# distributed under the License is distributed on an "AS IS" BASIS,
12-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
# See the License for the specific language governing permissions and
14-
# limitations under the License.
153

164
ARG SGLANG_IMAGE_TAG="v0.5.0rc2-cu126"
175

@@ -23,7 +11,7 @@ ARG ARCH_ALT="x86_64"
2311
ARG NIXL_UCX_REF="v1.19.0"
2412
ARG NIXL_TAG="0.5.0"
2513
ARG CMAKE_VERSION="3.31.8"
26-
ARG RUST_VERSION="1.87.0"
14+
ARG RUST_VERSION="1.89.0"
2715
ARG CARGO_BUILD_JOBS="16"
2816

2917
RUN apt-get update -y && \

0 commit comments

Comments
 (0)