penumbra-zone / decaf377

decaf377 is a prime-order group designed for use in SNARKs over BLS12-377
https://protocol.penumbra.zone/main/crypto/decaf377.html
12 stars 12 forks source link

wip: move rand_core requirement under std feature flag #100

Closed redshiftzero closed 3 months ago

redshiftzero commented 3 months ago

I discovered when compiling poseidon377 using decaf377 0.9.0 on thumbv8m.main-none-eabi that the addition of rand_core in #91 caused a build failure. This is because rand_core requires getrandom, which in turn does not support the target thumbv8m.main-none-eabi (more deets here: https://docs.rs/getrandom/latest/getrandom/#unsupported-targets). This PR sidesteps that issue by moving the new methods requiring rand_core under the std feature flag.

redshiftzero commented 3 months ago

Closing this as not needed, the build failure I was hitting was due to feature unification causing rand_core to pull in the default getrandom feature, that build is now succeeding: https://github.com/penumbra-zone/poseidon377/pull/53