Skip to content

Comments

Bump rand core to 0.9.1 and rand to 0.9.0#3902

Closed
aurelj wants to merge 1 commit intoembassy-rs:mainfrom
aurelj:rand_core_0_9
Closed

Bump rand core to 0.9.1 and rand to 0.9.0#3902
aurelj wants to merge 1 commit intoembassy-rs:mainfrom
aurelj:rand_core_0_9

Conversation

@aurelj
Copy link
Contributor

@aurelj aurelj commented Feb 19, 2025

This is kind of a follow-up on #3360.

Note that rand_core now provides a default implementation for TryRngCore so try_fill_bytes() is automatically implemented.

@aurelj
Copy link
Contributor Author

aurelj commented Feb 19, 2025

Note that the failed test is due to ed25519_dalek depending on an old version of rand_core.
See dalek-cryptography/curve25519-dalek#729

@Dirbaio
Copy link
Member

Dirbaio commented Feb 19, 2025

lgtm, but then we need to wait for an ed25519_dalek release

alternatively we could impl both the 0.6 and 0.9 trait, similar to how we do with embedded-hal 0.2 and 1.0

@aurelj
Copy link
Contributor Author

aurelj commented Feb 19, 2025

The rand_core feature of ed25519-dalek is actually only enabled in the dev-dependencies of embassy-boot and only for one test. I just reverted back the rand crate dev-dependencies of embassy-boot to 0.8 for this single test and everything works fine now.

@Dirbaio Dirbaio mentioned this pull request Apr 6, 2025
@Dirbaio
Copy link
Member

Dirbaio commented Apr 6, 2025

okay, sorry for taking so long to come back to this.

I don't think we should bump 0.6->0.9 directly, since this is a pretty widely used trait and seems most users have'nt updated yet. For example many rust-crypto crates still use 0.6. If we do the update it'll be impossible to use embassy hals together with rust crypto crates to e.g. generate a private key.

Instead, could you add 0.9 without removing 0.6? Add two deps rand-core-06 and rand-core-09 and impl both?

Since the rand-core crate is smallish and has no deps I don't think we should gate this with Cargo features.

@Dirbaio
Copy link
Member

Dirbaio commented May 18, 2025

#4217

@Dirbaio Dirbaio closed this May 18, 2025
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