pub trait VmInitialize {
type WasmEngine: WasmEngine;
type NativeVmExtension: NativeVmExtension;
// Required methods
fn get_vm_extension(&self) -> Self::NativeVmExtension;
fn get_scrypto_vm(&self) -> &ScryptoVm<Self::WasmEngine>;
}
Expand description
This trait is intended to encapsulate the data and types required to initalize the VMs in the engine.
The canonical implementation is VmModules
- but we have this trait
as well so that functions can take an &impl VmInitialize
parameter,
and we can avoid the proliferation of WasmEngine
and
NativeVmExtension
generics across the codebase.