Compiles and executes a compiled Miden program, returning the stack and any Miden errors. The program is passed in as a String, passed to the Miden Assembler, and then passed into the Miden Processor to be executed
(program: String, _pub_inputs: Vec<u128>)
| 4 | //Compiles and executes a compiled Miden program, returning the stack and any Miden errors. |
| 5 | //The program is passed in as a String, passed to the Miden Assembler, and then passed into the Miden Processor to be executed |
| 6 | pub fn execute(program: String, _pub_inputs: Vec<u128>) -> Result<ExecutionTrace, MidenError> { |
| 7 | let program = miden_assembly::Assembler::default() |
| 8 | .compile(program) |
| 9 | .map_err(MidenError::AssemblyError)?; |
| 10 | |
| 11 | miden_processor::execute(&program, StackInputs::empty(), MemAdviceProvider::empty()) |
| 12 | .map_err(MidenError::ExecutionError) |
| 13 | } |
| 14 | |
| 15 | //Errors that are returned from the Miden processor during execution. |
| 16 | #[derive(Debug)] |
no outgoing calls