Struct air_script::CodeGenerator
source · pub struct CodeGenerator { /* private fields */ }
Expand description
Code generation targeting Rust for the Winterfell prover CodeGenerator is used to generate a Rust implementation of the Winterfell STARK prover library’s Air trait. The generated Air expresses the constraints specified by the AirIR used to build the CodeGenerator.
Implementations§
source§impl CodeGenerator
impl CodeGenerator
sourcepub fn new(ir: &AirIR) -> CodeGenerator
pub fn new(ir: &AirIR) -> CodeGenerator
Builds a new Rust scope that represents a Winterfell Air trait implementation for the provided AirIR.
sourcepub fn generate(&self) -> String
pub fn generate(&self) -> String
Returns a string of Rust code containing a Winterfell Air implementation for the AirIR with which this CodeGenerator was instantiated.