Skip to content

fix(deps): Update MSRV to 1.85 and migrate to Edition 2024 - #305

Open
nabetti1720 wants to merge 1 commit into
RustCrypto:masterfrom
nabetti1720:fix/update-dependencies
Open

fix(deps): Update MSRV to 1.85 and migrate to Edition 2024#305
nabetti1720 wants to merge 1 commit into
RustCrypto:masterfrom
nabetti1720:fix/update-dependencies

Conversation

@nabetti1720

@nabetti1720 nabetti1720 commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Issue # (if available)

Fixed #303

Description of changes

Update the crate to Edition 2024 and set the MSRV to 1.85, aligning it with current dependency requirements.

This also enables the MSRV-aware resolver. By regenerating Cargo.lock using Rust 1.85, Cargo can select dependency versions compatible with the declared MSRV; consequently, you do not need to raise the crate's MSRV to 1.89 simply because the latest version of aes requires Rust 1.89.

In the new version, parts of the code were automatically corrected by cargo fix, so they appear as diffs.

@tarcieri

tarcieri commented Sep 4, 2026

Copy link
Copy Markdown
Member

The idea behind the MSRV-aware resolver is that if clients can select a compatible version of aes, all of the downstream consumers don't have to bump MSRV too

@nabetti1720

Copy link
Copy Markdown
Contributor Author

I tried a few approaches after reverting the CI's MSRV to 1.85.0, but none of them seem to work. I suppose the only remaining option is to pin aes to version 0.9.2. Do you have any other suggestions?

@tarcieri

tarcieri commented Sep 8, 2026

Copy link
Copy Markdown
Member

Use the MSRV as your current rust version when running the update, and the MSRV-aware resolver should select compatible versions

@nabetti1720
nabetti1720 force-pushed the fix/update-dependencies branch from bfe17a0 to a9e872c Compare September 10, 2026 12:58
@nabetti1720 nabetti1720 changed the title fix(deps): Update MSRV and dependencies fix(deps): Update dependencies Sep 10, 2026
@nabetti1720

Copy link
Copy Markdown
Contributor Author

If RustVersion remains set to 1.75, aes@0.9.3 is selected, even if you specify 1.85 in cargo update. On the other hand, if you specify RustVersion as 1.85, aes@0.9.2 is selected, as expected.
Is this behavior expected? In other words, should I set rust-version = "1.85" in this repository?

Cargo.toml of the latest commit:

% cat Cargo.toml | grep rust-version
rust-version = "1.75"

% CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS=fallback rustup run 1.85.0 cargo update
    Updating crates.io index
     Locking 3 packages to latest Rust 1.75 compatible versions
    Updating aes v0.9.2 -> v0.9.3 (requires Rust 1.89)
 Downgrading base64ct v1.8.3 -> v1.6.0 (available: v1.8.3, requires Rust 1.85)
 Downgrading zeroize v1.9.0 -> v1.8.2 (available: v1.9.0, requires Rust 1.85)

After version adjustments:

% cat Cargo.toml | grep rust-version
rust-version = "1.85"

% CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS=fallback rustup run 1.85.0 cargo update
    Updating crates.io index
     Locking 3 packages to latest Rust 1.85 compatible versions
 Downgrading aes v0.9.3 -> v0.9.2 (available: v0.9.3, requires Rust 1.89)
    Updating base64ct v1.6.0 -> v1.8.3
    Updating zeroize v1.8.2 -> v1.9.0

@tarcieri

Copy link
Copy Markdown
Member

1.75 is definitely wrong. All of the dependencies are 2024 edition so it should be bumped to 1.85 and the edition bumped to 2024 too (the MSRV aware resolver wasn't introduced until 1.84 anyway)

@nabetti1720
nabetti1720 force-pushed the fix/update-dependencies branch from a9e872c to 82d2a08 Compare September 11, 2026 12:18
@nabetti1720 nabetti1720 changed the title fix(deps): Update dependencies fix(deps): Update MSRV to 1.85 and migrate to Edition 2024 Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants