dusk_cdf/
lib.rs

1#![warn(missing_docs)]
2#![doc = include_str!("../README.md")]
3
4//! The binary format for CDF is a dense linear encoding.
5//!
6//! A circuit is a compositions of items that are either [`Witness`] or [`Constraint`].
7//!
8//! A [`Witness`] is a constraint system allocated value that is represented by its identifier
9//! and [`Scalar`] value.
10//!
11//! A [`Constraint`] is a [`Polynomial`] expression represented as a gate of the circuit that will
12//! allow computation in the constraint system. It will evaluate to a [`bool`] that is the
13//! representation of the result of the gate.
14//!
15//! A circuit description format file will contain a preamble with all its witnesses. Provided
16//! this, its witness index will reflect its line on the file, facilitating indexing.
17
18mod config;
19mod constraint;
20mod decoder;
21mod element;
22mod encoder;
23mod polynomial;
24mod preamble;
25mod source;
26mod witness;
27mod zkdb;
28
29pub use config::{BaseConfig, Config};
30pub use constraint::{Constraint, EncodableConstraint};
31pub use decoder::{CircuitDescription, DecoderContext};
32pub use element::{DecodableElement, Element, EncodableElement, Scalar};
33pub use encoder::{Encoder, EncoderContextFileProvider, EncoderContextProvider};
34pub use polynomial::{Polynomial, Selectors, WiredWitnesses};
35pub use preamble::Preamble;
36pub use source::EncodableSource;
37pub use witness::{EncodableWitness, Witness};
38pub use zkdb::{Breakpoint, State, ZkDebugger};
39
40pub(crate) mod bytes;
41pub(crate) use encoder::EncoderContext;
42pub(crate) use source::DecodedSource;