Skip to content

Add msrv.yml#545

Merged
felixhekhorn merged 4 commits into
masterfrom
msrv
Jun 30, 2026
Merged

Add msrv.yml#545
felixhekhorn merged 4 commits into
masterfrom
msrv

Conversation

@AkshatRai07

@AkshatRai07 AkshatRai07 commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

This is prerequisite for #537.

  • Adds an msrv.yml file to workflows.
  • Bumps Rust to 1.85.0.
  • Bumps Edition to 2024.

Copilot AI review requested due to automatic review settings June 26, 2026 18:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@AkshatRai07

AkshatRai07 commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator Author

The workflow failed.
I ran cargo msrv find, you can run it too but you first have to do cargo install cargo-msrv.
This is the end result:

Result:
   Considered (min … max):   Rust 0.11.0 … Rust 1.96.0 
   Search method:            bisect                    
   MSRV:                     1.81.0                    
   Target:                   x86_64-unknown-linux-gnu

We must bump the version to 1.81.0. We should not go any further because we need the "minimum" supported version.

@felixhekhorn felixhekhorn left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

  • as said on the other side we should (if possible) synchronize with PineAPPL; setting a lower minimum is always fine
  • can you please remind me what "Rust edition" is? is it relevant for us?

@felixhekhorn felixhekhorn added rust Rust extension related dependencies Pull requests that update a dependency file gsoc26 labels Jun 29, 2026
@AkshatRai07

Copy link
Copy Markdown
Collaborator Author

I am not well versed with version of languages and stuff, but all rust crates require atleast some version for compilation. In our case, there is this twox-hash crate which is required by lz4_flex crate which is required by the dekoder crate:

error: package `twox-hash v2.1.2` cannot be built because it requires rustc 1.81 or newer

So one must upgrade rust to 1.81 or later in order to work with the ecosystem.

@AkshatRai07

Copy link
Copy Markdown
Collaborator Author

For Rust Editions, Rust has a philosophy to keep the code always backwards compatible. So if there are some breaking changes, like introduction of a new keyword which may break code, they are released in Editions.

We can check what changes we should do in the code if we want to avoid breaking changes by doing cargo fix --edition. Running this did some changes to the eko/src/lib.rs and ekore/src/utils.rs, it is because they contain unsafe and macro, which were both affected in Edition 2024.

We should bump the Edition, because it's not costing us much. And it is better in code auditing and readability. For eg. #[no_mangle] becomes #[unsafe(no_mangle)] in Edition 2024 which is actually an improvement, it makes the unsafe nature of the no_mangle attribute explicit rather than hidden, making the code safer and easier to audit.

@AkshatRai07

AkshatRai07 commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator Author

Reason for the file changes:

  • Rust Edition 2024 requires atleast Rust 1.85.0, hence bumped that.
  • Rust Edition 2024 I guess also brought changes to fmt and clippy so had to change the code to not get pre-commit errors. The import order was then changed accordingly (due to new fmt), and there is no if !(condition) now in the code but it's if (not_condition) (due to new clippy).
  • It might look a lot is changed in eko/src/lib.rs, but the only change is the rust_qud_ker is wrapped in an unsafe block, and fmt made an indention to the code.

@felixhekhorn felixhekhorn left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a Changelog entry mentioning version+edition

@felixhekhorn felixhekhorn merged commit 52d639a into master Jun 30, 2026
7 checks passed
@felixhekhorn felixhekhorn deleted the msrv branch June 30, 2026 08:18
@felixhekhorn felixhekhorn mentioned this pull request Jun 30, 2026
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file gsoc26 rust Rust extension related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants