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