Skip to main content

VmInitialize

Trait VmInitialize 

Source
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.

Required Associated Types§

Required Methods§

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§