Skip to main content

ProgramExecutor

Trait ProgramExecutor 

Source
pub trait ProgramExecutor {
    // Required methods
    fn new(
        stack_inputs: StackInputs,
        advice_inputs: AdviceInputs,
        options: ExecutionOptions,
    ) -> Self
       where Self: Sized;
    fn execute<H: Host + Send>(
        self,
        program: &Program,
        host: &mut H,
    ) -> impl FutureMaybeSend<Result<ExecutionOutput, ExecutionError>>;
}
Expand description

A transaction-scoped program executor used by TransactionExecutor.

TODO: Move this trait into miden-vm once the executor boundary is consolidated there.

Required Methods§

Source

fn new( stack_inputs: StackInputs, advice_inputs: AdviceInputs, options: ExecutionOptions, ) -> Self
where Self: Sized,

Create a new executor configured with the provided transaction inputs and options.

Source

fn execute<H: Host + Send>( self, program: &Program, host: &mut H, ) -> impl FutureMaybeSend<Result<ExecutionOutput, ExecutionError>>

Execute the provided program against the given host.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ProgramExecutor for FastProcessor

Source§

fn new( stack_inputs: StackInputs, advice_inputs: AdviceInputs, options: ExecutionOptions, ) -> Self

Source§

fn execute<H: Host + Send>( self, program: &Program, host: &mut H, ) -> impl FutureMaybeSend<Result<ExecutionOutput, ExecutionError>>

Implementors§