[−][src]Struct leo_compiler::compiler::Compiler
Implementations
impl<F: Field + PrimeField, G: GroupType<F>> Compiler<F, G>
[src]
pub fn new(
package_name: String,
main_file_path: PathBuf,
output_directory: PathBuf
) -> Self
[src]
package_name: String,
main_file_path: PathBuf,
output_directory: PathBuf
) -> Self
pub fn parse_input(
&mut self,
input_string: &str,
state_string: &str
) -> Result<(), CompilerError>
[src]
&mut self,
input_string: &str,
state_string: &str
) -> Result<(), CompilerError>
Parse the input and state files. Stores a typed ast of all input variables to the program.
pub fn parse_program_without_input(
package_name: String,
main_file_path: PathBuf,
output_directory: PathBuf
) -> Result<Self, CompilerError>
[src]
package_name: String,
main_file_path: PathBuf,
output_directory: PathBuf
) -> Result<Self, CompilerError>
Parses program files. Returns a compiler struct that stores the typed program abstract syntax trees (ast).
pub fn parse_program_with_input(
package_name: String,
main_file_path: PathBuf,
output_directory: PathBuf,
input_string: &str,
state_string: &str
) -> Result<Self, CompilerError>
[src]
package_name: String,
main_file_path: PathBuf,
output_directory: PathBuf,
input_string: &str,
state_string: &str
) -> Result<Self, CompilerError>
Parses input, state, and program files. Returns a compiler struct that stores the typed input and typed program abstract syntax trees (ast).
pub fn parse_program_from_string(
&mut self,
program_string: &str
) -> Result<(), CompilerError>
[src]
&mut self,
program_string: &str
) -> Result<(), CompilerError>
Please use the 'parse_program' method instead.
Parses the Leo program string, constructs a syntax tree, and generates a program. Used for testing only.
pub fn set_main_input(&mut self, input: MainInput)
[src]
Manually sets main function input
pub fn verify_local_data_commitment(
&self,
system_parameters: &SystemParameters<Components>
) -> Result<bool, CompilerError>
[src]
&self,
system_parameters: &SystemParameters<Components>
) -> Result<bool, CompilerError>
Verifies the input to the program
pub fn checksum(&self) -> Result<String, CompilerError>
[src]
pub fn compile_constraints<CS: ConstraintSystem<F>>(
self,
cs: &mut CS
) -> Result<OutputBytes, CompilerError>
[src]
self,
cs: &mut CS
) -> Result<OutputBytes, CompilerError>
Synthesizes the circuit without program input to verify correctness.
pub fn compile_test_constraints(
self,
input_pairs: InputPairs
) -> Result<(), CompilerError>
[src]
self,
input_pairs: InputPairs
) -> Result<(), CompilerError>
Synthesizes the circuit for test functions with program input.
pub fn generate_constraints_helper<CS: ConstraintSystem<F>>(
self,
cs: &mut CS
) -> Result<OutputBytes, CompilerError>
[src]
self,
cs: &mut CS
) -> Result<OutputBytes, CompilerError>
Calls the internal generate_constraints method with arguments
pub fn to_bytes(&self) -> Result<Vec<u8>, CompilerError>
[src]
pub fn from_bytes(bytes: &[u8]) -> Result<Self, CompilerError>
[src]
Trait Implementations
impl<F: Clone + Field + PrimeField, G: Clone + GroupType<F>> Clone for Compiler<F, G>
[src]
impl<F: Field + PrimeField, G: GroupType<F>> ConstraintSynthesizer<F> for Compiler<F, G>
[src]
fn generate_constraints<CS: ConstraintSystem<F>>(
self,
cs: &mut CS
) -> Result<(), SynthesisError>
[src]
self,
cs: &mut CS
) -> Result<(), SynthesisError>
Synthesizes the circuit with program input.
Auto Trait Implementations
impl<F, G> RefUnwindSafe for Compiler<F, G> where
F: RefUnwindSafe,
G: RefUnwindSafe,
F: RefUnwindSafe,
G: RefUnwindSafe,
impl<F, G> Send for Compiler<F, G> where
G: Send,
G: Send,
impl<F, G> Sync for Compiler<F, G> where
G: Sync,
G: Sync,
impl<F, G> Unpin for Compiler<F, G> where
F: Unpin,
G: Unpin,
F: Unpin,
G: Unpin,
impl<F, G> UnwindSafe for Compiler<F, G> where
F: UnwindSafe,
G: UnwindSafe,
F: UnwindSafe,
G: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,