arkworks-rs / r1cs-std

R1CS constraints for bits, fields, and elliptic curves
https://www.arkworks.rs
Apache License 2.0
133 stars 58 forks source link

Replace derivative with educe #146

Closed weikengchen closed 2 months ago

weikengchen commented 2 months ago

Description

Same as a related PR in algebra: https://github.com/arkworks-rs/algebra/pull/832

There are some side effects of the derivative crate due to it being in a very old Rust edition. This PR replaces derivative with a popular alternative, educe.

It also appears that educe simplifies some derivations.


Before we can merge this PR, please make sure that all the following items have been checked off. If any of the checklist items are not applicable, please leave them but write a little note why.

N/A:

weikengchen commented 2 months ago

Let me take a look at the failing test---I think Rust changes how it handles "cfg(ci)".

weikengchen commented 2 months ago

Added the lint exception to let Rust allow "ci" cfg, and then, patch the std as well, which is necessary in loading alloc::sync when std::sync is not present.