pub trait Executor {
// Required methods
fn new_instance(
&self,
wasm_bytes: &[u8],
compilation_options: &CompilationOptions,
) -> Result<Box<dyn Instance>, ExecutorError>;
fn new_instance_from_cache(
&self,
cache_bytes: &[u8],
compilation_options: &CompilationOptions,
) -> Result<Box<dyn Instance>, ExecutorError>;
}
Required Methods§
Sourcefn new_instance(
&self,
wasm_bytes: &[u8],
compilation_options: &CompilationOptions,
) -> Result<Box<dyn Instance>, ExecutorError>
fn new_instance( &self, wasm_bytes: &[u8], compilation_options: &CompilationOptions, ) -> Result<Box<dyn Instance>, ExecutorError>
Creates a new VM executor instance.
Sourcefn new_instance_from_cache(
&self,
cache_bytes: &[u8],
compilation_options: &CompilationOptions,
) -> Result<Box<dyn Instance>, ExecutorError>
fn new_instance_from_cache( &self, cache_bytes: &[u8], compilation_options: &CompilationOptions, ) -> Result<Box<dyn Instance>, ExecutorError>
Creates a new VM executor instance from cache.