zcash / pasta_curves

Rust implementation for zcash/pasta
Other
81 stars 49 forks source link

Configure lazy_static to use no_std setup #58

Closed xxuejie closed 1 year ago

xxuejie commented 1 year ago

While pasta_curves is written as a no_std library, lazy_static still uses std, this means compiling will fail in a no_std environment with sqrt-table feature enabled.

This PR changes to use no_std version of lazy_static, which fixes the problem.

str4d commented 1 year ago

Ah, the problem is that with sqrt-table enabled we use core and alloc (so not purely no-std), but lazy_static depends on std specifically. Likely not noticed before because usually people running with alloc are just running with std.