#![cfg_attr(not(feature = "std"), no_std)]
#![warn(
unused,
future_incompatible,
nonstandard_style,
rust_2018_idioms,
missing_docs
)]
#![allow(deprecated)]
#![allow(clippy::op_ref)]
#[macro_use]
extern crate ark_std;
#[macro_use]
extern crate ark_ff;
#[macro_use]
extern crate ark_relations;
#[macro_use]
pub mod macros;
pub(crate) use ark_std::vec::Vec;
#[doc(hidden)]
pub mod gr1cs_var;
pub use gr1cs_var::*;
pub mod boolean;
pub mod fields;
pub mod groups;
pub mod pairing;
pub mod alloc;
pub mod cmp;
pub mod convert;
pub mod eq;
pub mod poly;
pub mod select;
#[cfg(test)]
pub(crate) mod test_utils;
pub mod uint8;
#[macro_use]
pub mod uint;
pub mod uint16 {
pub type UInt16<F> = super::uint::UInt<16, u16, F>;
}
pub mod uint32 {
pub type UInt32<F> = super::uint::UInt<32, u32, F>;
}
pub mod uint64 {
pub type UInt64<F> = super::uint::UInt<64, u64, F>;
}
pub mod uint128 {
pub type UInt128<F> = super::uint::UInt<128, u128, F>;
}
#[allow(missing_docs)]
pub mod prelude {
pub use crate::{
alloc::*,
boolean::Boolean,
convert::{ToBitsGadget, ToBytesGadget},
eq::*,
fields::{FieldOpsBounds, FieldVar},
groups::{CurveVar, GroupOpsBounds},
pairing::PairingVar,
select::*,
uint128::UInt128,
uint16::UInt16,
uint32::UInt32,
uint64::UInt64,
uint8::UInt8,
GR1CSVar,
};
}
pub trait Assignment<T> {
fn get(self) -> Result<T, ark_relations::gr1cs::SynthesisError>;
}
impl<T> Assignment<T> for Option<T> {
fn get(self) -> Result<T, ark_relations::gr1cs::SynthesisError> {
self.ok_or(ark_relations::gr1cs::SynthesisError::AssignmentMissing)
}
}