Closed pinkforest closed 1 year ago
This is unrelated to std
: it's just a target that getrandom
doesn't have support for.
That's why it's a feature and why things that require randomness use the RngCore
trait: so the feature can be disabled.
The solution is to not enable the feature on these platforms. They need to provide their own RNG which impls CryptoRng
+ RngCore
.
Yeah I mean it's part of no_std support as --no-default-features was the one that failed and that came up
EDIT: I worded my original issue wrong oops - I've re-worded so we need to make getrandom in rand_core optional
Aah, yeah this is the problem:
rand_core = { version = "0.6", default-features = false, features = ["getrandom"] }
Instead there should be a getrandom
feature which activates rand_core/getrandom
Looks like features = ["getrandom"]
was added in #95, although I'm not sure why as that PR does not reference OsRng
, which is the main API provided by enabling getrandom
Yeah - I'll send a PR to fix it - getrandom is needed for the doctests only
Related
https://github.com/dalek-cryptography/x25519-dalek/issues/88- Red herring - not this craterand_core?/getrandom
It seems getrandom is brought by rand_core which isn't optional - that stops thumb building
https://github.com/pinkforest/x25519-dalek/actions/runs/4395315721/jobs/7697018808
Maybe we can make the get_random weak and gate via getrandom feature ?
This ofc requires some work around API re: providing randomness