Skip to content

Commit

Permalink
feat: init_unsafe in builder (#176)
Browse files Browse the repository at this point in the history
  • Loading branch information
jtguibas authored Sep 19, 2023
1 parent ab1f9ff commit e1f7148
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 @@ -172,6 +172,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 e1f7148

Please sign in to comment.