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 rand_core version to 0.9.0 #3046

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

John-Vash
Copy link

@John-Vash John-Vash commented Jan 28, 2025

Thank you for your contribution!

We appreciate the time and effort you've put into this pull request.
To help us review it efficiently, please ensure you've gone through the following checklist:

Submission Checklist 📝

  • I have updated existing examples or added new ones (if applicable).
  • I have used cargo xtask fmt-packages command to ensure that all changed code is formatted correctly.
  • My changes were added to the CHANGELOG.md in the proper section.
  • I have added necessary changes to user code to the Migration Guide.
  • My changes are in accordance to the esp-rs API guidelines

Extra:

Pull Request Details 📖

Description

Please provide a clear and concise description of your changes, including the motivation behind these changes. The context is crucial for the reviewers.

These changes are to support the latest version of rand_core's RngCore trait, where try_fill_bytes has been moved to the TryRngCore trait.

Testing

Describe how you tested your changes.

Tested by running wifi examples where a u64 seed is generated via RngCore::next_u64 on a esp32-c6 devkit.

@bjoernQ bjoernQ added the skip-changelog No changelog modification needed label Jan 28, 2025
Copy link
Member

@SergioGasquez SergioGasquez left a comment

Choose a reason for hiding this comment

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

I guess this deserves a mention in the migration guide.

@bugadani
Copy link
Contributor

We shouldn't unconditionally pull in <1.0 dependencies, even if the RNG itself is unstable.

@jessebraham
Copy link
Member

We shouldn't unconditionally pull in <1.0 dependencies, even if the RNG itself is unstable.

What do you mean by this? This dependency was already included, they've just updated the version, and there are like a dozen other dependencies which are <1.0 and not behind a feature.

@bugadani
Copy link
Contributor

RngCore will be part of our public API. By the way, is there a reason to actually drop support for the old version?

@John-Vash
Copy link
Author

I have added an entry to the MIGRATING-0.23.md document.

Also just to clarify a bit, the removal of esp-hal's try_fill_bytes implementation does not mean the try_fill_bytes method has been removed from esp-hal::rng::Rng completely. With the latest update to rand_core, an implementation of the RngCore trait auto implements the TryRngCore trait and the try_fill_bytes method exists as part of the TryRngCore trait. This means esp-hal::rng::Rng still provides the try_fill_bytes method when the rand_core::TryRngCore trait is in scope.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog No changelog modification needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants