pub fn cairo_run_program(
program: &Program,
program_input: Option<ProgramInput>,
cairo_run_config: CairoRunConfig<'_>,
extra_hint_processor: Option<&mut dyn HintProcessor>,
) -> Result<CairoRunner, CairoRunError>Expand description
Executes a Cairo program with the given configuration, optionally handling program input and proof mode.
§Arguments
program: A reference to aProgramobject that represents the compiled Cairo program to run.program_input: An optional program input source. IfSome, the input is injected into the execution scope under the key"program_input"and later decoded by hints into the concrete type the hints expect (e.g.SimpleProgramInput).layout: ALayoutNamespecifying the Cairo layout to use in the VM (e.g.,plain,all_cairo).dynamic_layout_params: An optionalCairoLayoutParamsproviding dynamic parameters for the layout. This is used only if thedynamiclayout is selected.proof_mode: Aboolindicating whether to run the program in proof mode (true) or validation mode (false).
§Returns
Ok(CairoRunner): If the program runs successfully, returns theCairoRunnerinstance containing the execution state.Err(CairoRunError): If an error occurs during execution, returns aCairoRunErrordescribing the problem.