Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump MSRV to 1.73 #768

Open
StackOverflowExcept1on opened this issue Nov 10, 2024 · 4 comments
Open

Bump MSRV to 1.73 #768

StackOverflowExcept1on opened this issue Nov 10, 2024 · 4 comments

Comments

@StackOverflowExcept1on
Copy link
Contributor

Motivation:

  1. We can get rid of lazy_static! in favor of std::sync::LazyLock
  2. We can use {integer}::div_ceil
    const fn div_ceil(lhs: usize, rhs: usize) -> usize {
  3. Crates from RustCrypto already have pre-releases that require Rust 1.73+ or even Rust 1.81+ in some cases. For example: https://github.com/RustCrypto/elliptic-curves/blob/master/k256/Cargo.toml
  4. Starting with 1.81 we can use core::error::Error and remove the thiserror-nostd-notrait dependency in favor of thiserror: Allow disabling std dependency on 1.81+ dtolnay/thiserror#373
@conradoplg
Copy link
Contributor

conradoplg commented Nov 11, 2024

This is REALLY tempting, but we might want to give a bit more time to crate users to update their Rust. I'm leaving this open while we consider it. Thanks for pointing these out!

@str4d
Copy link
Contributor

str4d commented Nov 11, 2024

Providing the full context:

  • LazyLock requires MSRV 1.80, but OnceLock could also be used to get rid of lazy_static!, and it only requires MSRV 1.70.
  • {integer}::div_ceil requires MSRV 1.73.
  • RustCrypto had an MSRV of 1.73 as their last common MSRV IIRC (the latest non-pre-release of k256 is actually MSRV 1.65), but have bumped to 1.81 in pre-releases of crates that were using generic-array to instead use hybrid-array, which has an MSRV of 1.81 simply to remove its std feature flag and replace std::error::Error with core::error::Error: Remove std RustCrypto/hybrid-array#85
    • Based on Remove std RustCrypto/hybrid-array#85 (comment) I believe they plan to hold off actually cutting releases of those downstream crates (such as the aforementioned k256) until 1.81 is at N - 3 (i.e. waiting until the release of Rust 1.84 in early 2025). And I do not think that the FROST crates should depend on pre-releases of those crates.

@conradoplg
Copy link
Contributor

Thanks - I guess we better wait until 1.84 at least.

It seems sensible to follow RustCrypto MSRV so we might already do the first two.

@mpguerra mpguerra changed the title Bump MSRV to 1.81 Bump MSRV to 1.73 Nov 19, 2024
@mpguerra mpguerra moved this to Sprint Backlog in FROST Nov 19, 2024
@mpguerra
Copy link
Contributor

We've decided to update to 1.73 for now

@mpguerra mpguerra moved this from Sprint Backlog to Product Backlog in FROST Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Product Backlog
Development

Successfully merging a pull request may close this issue.

4 participants