1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//! Core interface for working with various relations that are useful in
//! zkSNARKs. At the moment, we only implement APIs for working with Generalized
//! Rank-1 Constraint Systems (R1CS) (See <https://eprint.iacr.org/2024/1245.pdf>).
//!
//! # Compatibility with R1CS
//!
//! In previous versions, this crate only supported R1CS.
//! For ease of migration, a GR1CS instance is equipped with an R1CS predicate by default.
//! Also, there is a separate
//! [`enforce_r1cs_constraint`](`crate::gr1cs::ConstraintSystemRef::enforce_r1cs_constraint`) function that has the same API as the `enforce_constraint` function
//! in previous versions.
//! Hence, by replacing the latter with the former and updating `use` statements,
//! you can migrate your code to the new version.
extern crate ark_std;
/// The Generalized Rank-1 Constraint System (GR1CS) Infrastructure
/// The Squared Rank-1 Constraint System (GR1CS) Infrastructure
/// Functions and data structures needed for working with GR1CS