pub struct Process { /* private fields */ }Expand description
A Process is the underlying execution engine for a Miden Program.
Typically, you do not need to worry about, or use Process directly, instead you should prefer to use either execute or execute_iter, which also handle setting up the process state, inputs, as well as compute the ExecutionTrace for the program.
However, for situations in which you want finer-grained control over those steps, you will need to construct an instance of Process using Process::new, invoke Process::execute, and then get the execution trace using ExecutionTrace::new using the outputs produced by execution.
Implementations§
Source§impl Process
impl Process
Sourcepub fn new(
kernel: Kernel,
stack_inputs: StackInputs,
execution_options: ExecutionOptions,
) -> Self
pub fn new( kernel: Kernel, stack_inputs: StackInputs, execution_options: ExecutionOptions, ) -> Self
Creates a new process with the provided inputs.
Sourcepub fn new_debug(kernel: Kernel, stack_inputs: StackInputs) -> Self
pub fn new_debug(kernel: Kernel, stack_inputs: StackInputs) -> Self
Creates a new process with provided inputs and debug options enabled.
Sourcepub fn execute(
&mut self,
program: &Program,
host: &mut impl Host,
) -> Result<StackOutputs, ExecutionError>
pub fn execute( &mut self, program: &Program, host: &mut impl Host, ) -> Result<StackOutputs, ExecutionError>
Executes the provided Program in this process.
pub const fn kernel(&self) -> &Kernel
pub fn into_parts(self) -> (System, Decoder, Stack, RangeChecker, Chiplets)
Trait Implementations§
Source§impl<'a> From<&'a Process> for ProcessState<'a>
impl<'a> From<&'a Process> for ProcessState<'a>
Auto Trait Implementations§
impl Freeze for Process
impl RefUnwindSafe for Process
impl Send for Process
impl Sync for Process
impl Unpin for Process
impl UnwindSafe for Process
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more