Skip to content

Update rust crates dependencies#1332

Open
BraveChicken1 wants to merge 1 commit intolief-project:mainfrom
BraveChicken1:bump/dependencies
Open

Update rust crates dependencies#1332
BraveChicken1 wants to merge 1 commit intolief-project:mainfrom
BraveChicken1:bump/dependencies

Conversation

@BraveChicken1
Copy link
Copy Markdown
Contributor

This PR updates the dependencies of the several rust crates.

It bumps the versions of dependencies, removes unused dependencies and moves the tempfile dependency to the dev-dependencies, since it's only used by the tests. It also changes the elf_tests.rs test, by ensuring it does not use the reserved gen keyword anymore.
As a result of this the MSRV is bumped to 1.85.0.

By bumping the dependencies, we can benefit of the stability improvements of these dependencies, and more important several vulnerability fixes to these dependencies.
Dependents of LIEF benefit of this, because the overal security and stability of the bindings improve and their dependency tree does not need to contain older package versions anymore. This then also results in improved security and stability of the dependents.

Please note that miette, zip and cxx were not updated to the latest versions, because of compatibility issues with autocxx (miette and cxx) and because I don't want to bump the MSRV too far (zip 8.5.1 requires MSRV 1.88.0, while 1.85.0 is the current standard for big Rust projects).

To support upgrading miette and cxx, we would need to bump the dependencies of autocxx too. The autocxx project seems to be a bit inactive at the moment, but I will try to get the changes into the latest version of autocxx. This will then also contain the bump of the aquamarine dependency, which you have changed on your own fork of autocxx. I will open a follow up PR once autocxx is upgraded.

LIEF still builds and works after these changes, I tested this on several different types of machines. I also read through the changelogs of the different dependencies to ensure there were no breaking changes for LIEF.

Some small final notices:

  • These changes open the path to upgrading the used rust edition of LIEF to 2024, I'm willing to look into this in a future PR.
  • The main branch contains several commits and PRs (including my PRs from several weeks ago) that were not part of the latest release. These commits seem to contain several fixes and improvements that would be nice to have in the next release.

@romainthomas
Copy link
Copy Markdown
Member

Thank you.

Two questions:

  1. Is this AI-generated? If so, in which extent?
  2. Did you test on Windows?

@BraveChicken1
Copy link
Copy Markdown
Contributor Author

No, I did not use AI to generate any of this. I read through the changelogs and crates.io pages myself and then upgraded the dependencies to the most recent, still compatible version. I know the diff is very big, but this is mainly because the lock files were regenerated by cargo.

I did test if lief still builds and runs on Windows, and this does indeed still work.

@romainthomas
Copy link
Copy Markdown
Member

Ok thank you. I'm not against bumping the MSRV but I'll need to assess the impact on the build pipeline

@BraveChicken1
Copy link
Copy Markdown
Contributor Author

BraveChicken1 commented Apr 26, 2026

Yes, I understand that bumping the MSRV has some impact on the library, but I think bumping it now is a good moment to future proof LIEF.

Let me know if there is anything I can help with.

romainthomas added a commit that referenced this pull request Apr 26, 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