#6418·pyo3

Bump to Rust 1.85, edition 2024

Author: davidhewittCreated Sep 15, 2026Updated Sep 15, 2026

Our last MSRV bump was to 1.83, nearly a year ago, in #5531

I have been experimenting recently in #6386 to see what performance gain we could get from merged doctests. I'd previously looked briefly but missed that trivially bumping the edition and running doctests was insufficient; the merged build was failing so it was falling back to unmerged doctests with no material gain.

In #6386 I've run through the whole edition bump and successfully proven merged doctests are running. It's made quite a substantial difference to CI.

I got local AI to write me a script to compare a recent merge to main which ran pyo3-ffi-check to the latest run #6386. Table below for jobs with greater than 10% move.

Total compute time for CI went from 11h 30m to 9h 51m

I think based on this, we should proceed with bumping MSRV up to 1.85. The discussion leading to #5531 noted that Linux distros we track all have 1.85 and up.

Hopefully cryptography would be ok with this change? cc @alex

I'd like to land this in 0.30 given it looks like it'll unlock quite a significant CI boost for us.


Job 34718265503 34963409993 Δ last − first Change
wasm32-wasip1 16m43s 7m30s −9m13s -55.1%
valgrind 32m11s 15m56s −16m15s -50.5%
test-introspection (macos-latest, arm64, aarch64-apple-darwin) 1m06s 0m42s −0m24s -36.4%
python3.14-x64 windows-latest rust-stable / build 21m30s 13m50s −7m40s -35.7%
python3.15-dev-x64 windows-latest rust-stable / build 25m07s 16m53s −8m14s -32.8%
test-cross-compilation windows-latest -> aarch64-pc-windows-msvc 2m37s 1m47s −0m50s -31.8%
python3.10-x64 windows-latest rust-stable / build 19m07s 13m35s −5m32s -28.9%
test-version-limits 1m03s 0m46s −0m17s -27.0%
python3.15t-dev-x64 ubuntu-latest rust-stable / build 7m11s 5m15s −1m56s -26.9%
python3.11-x64 ubuntu-latest rust-stable / build 8m13s 6m03s −2m10s -26.4%
python3.11-x64 windows-latest rust-stable / build 20m54s 15m28s −5m26s -26.0%
python3.13-x64 ubuntu-latest rust-stable / build 8m09s 6m05s −2m04s -25.4%
python3.14-x64 ubuntu-latest rust-stable / build 8m49s 6m41s −2m08s -24.2%
python3.14-x64 ubuntu-latest rust-nightly / build 5m37s 4m16s −1m21s -24.0%
python3.13-x64 windows-latest rust-stable / build 20m01s 15m14s −4m47s -23.9%
pytests-type-checking (pyrefly) 0m34s 0m26s −0m08s -23.5%
python3.14-arm64 ubuntu-24.04-arm rust-stable / build 9m34s 7m24s −2m10s -22.6%
python3.14t-arm64 ubuntu-24.04-arm rust-stable / build 6m38s 5m10s −1m28s -22.1%
pythongraalpy25.0-arm64 macos-latest rust-stable / build 8m45s 6m50s −1m55s -21.9%
python3.14t-x64 windows-latest rust-stable / build 15m05s 11m50s −3m15s -21.5%
python3.9-x64 macos-15-intel rust-stable / build 18m44s 14m46s −3m58s -21.2%
python3.9-x64 windows-latest rust-stable / build 17m02s 13m34s −3m28s -20.4%
python3.14-arm64 macos-latest rust-stable / build 10m37s 8m41s −1m56s -18.2%
python3.14-x86 windows-latest rust-stable / build 22m54s 19m00s −3m54s -17.0%
python3.14t-arm64 windows-11-arm rust-stable / build 14m04s 11m45s −2m19s -16.5%
python3.14-arm64 windows-11-arm rust-stable / build 17m49s 14m57s −2m52s -16.1%
careful 5m25s 4m33s −0m52s -16.0%
python3.14-x64 ubuntu-latest rust-beta / build 7m12s 6m04s −1m08s -15.7%
python3.15-dev-arm64 macos-latest rust-stable / build 12m58s 10m56s −2m02s -15.7%
python3.15t-dev-x64 windows-latest rust-stable / build 18m11s 15m26s −2m45s -15.1%
test-debug-min-version 11m19s 9m39s −1m40s -14.7%
test-introspection (windows-latest, x64, x86_64-pc-windows-msvc) 1m44s 1m29s −0m15s -14.4%
python3.12-x64 ubuntu-latest rust-stable / build 8m20s 7m10s −1m10s -14.0%
no_std (clippy) 2m24s 2m04s −0m20s -13.9%
python3.15-dev-x64 ubuntu-latest rust-stable / build 9m52s 8m42s −1m10s -11.8%
python3.14t-x64 ubuntu-latest rust-stable / build 4m47s 5m30s +0m43s +15.0%
test-cross-compilation ubuntu-latest -> aarch64-unknown-linux-gnu 2m13s 2m33s +0m20s +15.0%
python3.13-arm64 macos-latest rust-stable / build 7m37s 9m27s +1m50s +24.1%
pythonpypy3.11-arm64 macos-latest rust-stable / build 4m43s 5m56s +1m13s +25.8%
test-cross-compilation-windows 1m09s 1m27s +0m18s +26.1%
python3.11-arm64 macos-latest rust-stable / build 8m39s 10m55s +2m16s +26.2%
pytests-type-checking (mypy) 0m27s 0m37s +0m10s +37.0%
emscripten 6m33s 10m19s +3m46s +57.5%

(Don't worry about emscripten - the apparent slowdown is because the build cache was bust by the changes so the branch includes a rebuild of CPython.)