MCPcopy Create free account
hub / github.com/ControlCplusControlV/Scribe / execute

Function execute

crates/papyrus/src/executor.rs:6–13  ·  view source on GitHub ↗

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>)

Source from the content-addressed store, hash-verified

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
6pub 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)]

Callers 4

debug_executionFunction · 0.85
run_exampleFunction · 0.85
run_miden_functionFunction · 0.85
start_replFunction · 0.85

Calls

no outgoing calls

Tested by 3

debug_executionFunction · 0.68
run_exampleFunction · 0.68
run_miden_functionFunction · 0.68