Skip to content

Commit 211624c

Browse files
authored
Switch to using a minimum-supported Rust version (MSRV) (#35)
This makes it easier to contribute to the Rust portions of CPython if you have a newer version of Rust installed.
1 parent 90d6ca9 commit 211624c

9 files changed

Lines changed: 16 additions & 11 deletions

File tree

‎.github/setup-rust-windows/action.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ inputs:
1111
runs:
1212
using: composite
1313
steps:
14-
- uses: dtolnay/rust-toolchain@ab40b01f54fe82bdf65693ea090a1e4942c136e7 # 1.91.1
14+
- uses: dtolnay/rust-toolchain@f133eefe930d61f0d9371efd474daf0125ed3dd1 # 1.95.0
1515
with:
16-
toolchain: 1.91.1
16+
toolchain: 1.95.0
1717
targets: i686-pc-windows-msvc,x86_64-pc-windows-msvc,aarch64-pc-windows-msvc
1818
# LIBCLANG_PATH must be set explicitly so the vcxproj uses the LLVM we
1919
# install here rather than the VS-bundled LLVM whose clang headers have

‎.github/workflows/build.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -353,9 +353,9 @@ jobs:
353353
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
354354
with:
355355
persist-credentials: false
356-
- uses: dtolnay/rust-toolchain@ab40b01f54fe82bdf65693ea090a1e4942c136e7 # 1.91.1
356+
- uses: dtolnay/rust-toolchain@f133eefe930d61f0d9371efd474daf0125ed3dd1 # 1.95.0
357357
with:
358-
toolchain: 1.91.1
358+
toolchain: 1.95.0
359359
targets: ${{ matrix.arch }}-linux-android
360360
- name: Build and test
361361
run: JAVA_HOME="${JAVA_HOME_21_X64:-$JAVA_HOME_21_arm64}" python3 Platforms/Android ci --fast-ci ${{ matrix.arch }}-linux-android
@@ -370,9 +370,9 @@ jobs:
370370
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
371371
with:
372372
persist-credentials: false
373-
- uses: dtolnay/rust-toolchain@ab40b01f54fe82bdf65693ea090a1e4942c136e7 # 1.91.1
373+
- uses: dtolnay/rust-toolchain@f133eefe930d61f0d9371efd474daf0125ed3dd1 # 1.95.0
374374
with:
375-
toolchain: 1.91.1
375+
toolchain: 1.95.0
376376
targets: aarch64-apple-ios-sim
377377
# GitHub recommends explicitly selecting the desired Xcode version:
378378
# https://github.com/actions/runner-images/issues/12541#issuecomment-3083850140

‎.github/workflows/reusable-wasi.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ jobs:
4747
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
4848
with:
4949
python-version: '3.x'
50-
- uses: dtolnay/rust-toolchain@ab40b01f54fe82bdf65693ea090a1e4942c136e7 # 1.91.1
50+
- uses: dtolnay/rust-toolchain@f133eefe930d61f0d9371efd474daf0125ed3dd1 # 1.95.0
5151
with:
52-
toolchain: 1.91.1
52+
toolchain: 1.95.0
5353
targets: wasm32-wasip1
5454
- name: "Runner image version"
5555
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"

‎Cargo.toml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,7 @@ members = [
44
"Modules/_base64", "Modules/cpython-build-helper", "Modules/cpython-rust-staticlib",
55
"Modules/cpython-sys"
66
]
7+
8+
[workspace.package]
9+
# Make sure to also update the Rust toolchains in GitHub Actions whenever this version is modified
10+
rust-version = "1.95"

‎Modules/_base64/Cargo.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
name = "_base64"
33
version = "0.1.0"
44
edition = "2024"
5+
rust-version.workspace = true
56

67
[dependencies]
78
cpython-sys ={ path = "../cpython-sys" }

‎Modules/cpython-build-helper/Cargo.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
name = "cpython-build-helper"
33
version = "0.1.0"
44
edition = "2024"
5+
rust-version.workspace = true
56

67
[dependencies]
78
shlex = "1.3"

‎Modules/cpython-rust-staticlib/Cargo.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
name = "cpython-rust-staticlib"
33
version = "0.1.0"
44
edition = "2024"
5+
rust-version.workspace = true
56

67
[dependencies]
78
_base64 ={ path = "../_base64" }

‎Modules/cpython-sys/Cargo.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
name = "cpython-sys"
33
version = "0.1.0"
44
edition = "2024"
5+
rust-version.workspace = true
56

67
[dependencies]
78

‎rust-toolchain.toml‎

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)