Skip to content

Commit

Permalink
feat: init_unsafe in builder
Browse files Browse the repository at this point in the history
  • Loading branch information
jtguibas committed Sep 19, 2023
1 parent ccec577 commit fa10398
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions plonky2x/src/frontend/builder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,11 @@ impl<L: PlonkParameters<D>, const D: usize> CircuitBuilder<L, D> {
V::init(self)
}

/// Initializes a variable with a value from the circuit input without any validity checks.
pub fn init_unsafe<V: CircuitVariable>(&mut self) -> V {
V::init_unsafe(self)
}

/// Initializes a variable with a constant value in the circuit.
pub fn constant<V: CircuitVariable>(&mut self, value: V::ValueType<L::Field>) -> V {
V::constant(self, value)
Expand Down

0 comments on commit fa10398

Please sign in to comment.