pub struct EmbeddedCircuit {
pub circuit: Circuit,
pub chip_calls: Vec<ChipCall>,
}Expand description
One chip of a CircuitM4, as the circuit that generates its witness.
The chip’s interface is its circuit’s inout segment: a call site supplies those words positionally, and every value the chip holds beyond them is derived from them. An inout wire the call does not reach is filled with zero.
A wire promoted with CircuitBuilder::mark_inout serves
as well as one declared with CircuitBuilder::add_inout.
Witness generation assigns every inout wire from the call data, then evaluation recomputes the
promoted ones over it. Nothing checks that the two agree, and nothing has to: where they
disagree the row stops matching the call site, which is what the chip call itself enforces.
That is what lets a caller pass a chip’s output. The caller is populated whole before its calls are read, so it holds the output already — generally from a hint, whose correctness the chip call is what constrains.
Fields§
§circuit: CircuitThe circuit generating one instance of the chip.
chip_calls: Vec<ChipCall>The chips this one delegates subrelations to, one entry per call per instance.
Auto Trait Implementations§
impl !RefUnwindSafe for EmbeddedCircuit
impl !UnwindSafe for EmbeddedCircuit
impl Freeze for EmbeddedCircuit
impl Send for EmbeddedCircuit
impl Sync for EmbeddedCircuit
impl Unpin for EmbeddedCircuit
impl UnsafeUnpin for EmbeddedCircuit
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more