Skip to content

Commit eff10de

Browse files
committed
chore: update MSRV to 1.80
because native-tls updated its MSRV to 1.80 in a patch release, and the resolver didn't take MSRV into account until 1.85 though tbf, 1.72 is pretty old and i very much appreciate that i can now use C string literals
1 parent cbeeb77 commit eff10de

File tree

9 files changed

+12
-11
lines changed

9 files changed

+12
-11
lines changed

.github/workflows/other-checks.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ jobs:
4444
run: |
4545
cargo check -p ort --no-default-features
4646
msrv:
47-
name: MSRV (1.72)
47+
name: MSRV (1.80)
4848
runs-on: ubuntu-latest
4949
steps:
5050
- uses: actions/checkout@v4
5151
- name: Install stable Rust toolchain
52-
uses: dtolnay/rust-toolchain@1.72
52+
uses: dtolnay/rust-toolchain@1.80
5353
- uses: Swatinem/rust-cache@v1
5454
- name: Run checks
5555
run: |

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ name = "ort"
3232
description = "A safe Rust wrapper for ONNX Runtime 1.20 - Optimize and accelerate machine learning inference & training"
3333
version = "2.0.0-rc.9"
3434
edition = "2021"
35-
rust-version = "1.72"
35+
rust-version = "1.80"
3636
license = "MIT OR Apache-2.0"
3737
repository = "https://github.com/pykeio/ort"
3838
homepage = "https://ort.pyke.io/"

clippy.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
msrv = "1.72"
1+
msrv = "1.80"

ort-sys/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "ort-sys"
33
description = "Unsafe Rust bindings for ONNX Runtime 1.20 - Optimize and Accelerate Machine Learning Inferencing"
44
version = "2.0.0-rc.9"
55
edition = "2021"
6-
rust-version = "1.72"
6+
rust-version = "1.80"
77
links = "onnxruntime"
88
license = "MIT OR Apache-2.0"
99
repository = "https://github.com/pykeio/ort"

src/execution_providers/qnn.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ impl ExecutionProvider for QNNExecutionProvider {
210210
let ffi_options = self.options.to_ffi();
211211
crate::ortsys![unsafe SessionOptionsAppendExecutionProvider(
212212
session_builder.ptr_mut(),
213-
b"QNN\0".as_ptr().cast::<core::ffi::c_char>(),
213+
c"QNN".as_ptr().cast::<core::ffi::c_char>(),
214214
ffi_options.key_ptrs(),
215215
ffi_options.value_ptrs(),
216216
ffi_options.len(),

src/execution_providers/webgpu.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ impl ExecutionProvider for WebGPUExecutionProvider {
197197
let ffi_options = self.options.to_ffi();
198198
crate::ortsys![unsafe SessionOptionsAppendExecutionProvider(
199199
session_builder.ptr_mut(),
200-
b"WebGPU\0".as_ptr().cast::<core::ffi::c_char>(),
200+
c"WebGPU".as_ptr().cast::<core::ffi::c_char>(),
201201
ffi_options.key_ptrs(),
202202
ffi_options.value_ptrs(),
203203
ffi_options.len(),

src/execution_providers/xnnpack.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ impl ExecutionProvider for XNNPACKExecutionProvider {
5757
let ffi_options = self.options.to_ffi();
5858
crate::ortsys![unsafe SessionOptionsAppendExecutionProvider(
5959
session_builder.ptr_mut(),
60-
b"XNNPACK\0".as_ptr().cast::<core::ffi::c_char>(),
60+
c"XNNPACK".as_ptr().cast::<core::ffi::c_char>(),
6161
ffi_options.key_ptrs(),
6262
ffi_options.value_ptrs(),
6363
ffi_options.len(),

src/session/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -552,8 +552,8 @@ impl Session {
552552
pub fn set_workload_type(&mut self, workload_type: WorkloadType) -> Result<()> {
553553
static KEY: &[u8] = b"ep.dynamic.workload_type\0";
554554
match workload_type {
555-
WorkloadType::Default => self.set_dynamic_option(KEY.as_ptr().cast(), b"Default\0".as_ptr().cast()),
556-
WorkloadType::Efficient => self.set_dynamic_option(KEY.as_ptr().cast(), b"Efficient\0".as_ptr().cast())
555+
WorkloadType::Default => self.set_dynamic_option(KEY.as_ptr().cast(), c"Default".as_ptr().cast()),
556+
WorkloadType::Efficient => self.set_dynamic_option(KEY.as_ptr().cast(), c"Efficient".as_ptr().cast())
557557
}
558558
}
559559

src/value/impl_tensor/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ mod extract;
44
use alloc::{
55
format,
66
string::{String, ToString},
7-
sync::Arc
7+
sync::Arc,
8+
vec
89
};
910
use core::{
1011
fmt::Debug,

0 commit comments

Comments
 (0)