[−][src]Trait wasmer_engine::Tunables
An engine delegates the creation of memories, tables, and globals to a foreign implementor of this trait.
Required methods
fn memory_style(&self, memory: &MemoryType) -> MemoryStyle
Construct a MemoryStyle
for the provided MemoryType
fn table_style(&self, table: &TableType) -> TableStyle
Construct a TableStyle
for the provided TableType
fn create_memory(
&self,
ty: &MemoryType,
style: &MemoryStyle
) -> Result<Arc<dyn Memory>, MemoryError>
&self,
ty: &MemoryType,
style: &MemoryStyle
) -> Result<Arc<dyn Memory>, MemoryError>
Create a memory given a memory type
fn create_table(
&self,
ty: &TableType,
style: &TableStyle
) -> Result<Arc<dyn Table>, String>
&self,
ty: &TableType,
style: &TableStyle
) -> Result<Arc<dyn Table>, String>
Create a memory given a memory type
Provided methods
fn create_global(&self, ty: GlobalType) -> Result<Arc<Global>, String>
Create a global with an unset value.
fn create_memories(
&self,
module: &ModuleInfo,
memory_styles: &PrimaryMap<MemoryIndex, MemoryStyle>
) -> Result<PrimaryMap<LocalMemoryIndex, Arc<dyn Memory>>, LinkError>
&self,
module: &ModuleInfo,
memory_styles: &PrimaryMap<MemoryIndex, MemoryStyle>
) -> Result<PrimaryMap<LocalMemoryIndex, Arc<dyn Memory>>, LinkError>
Allocate memory for just the memories of the current module.
fn create_tables(
&self,
module: &ModuleInfo,
table_styles: &PrimaryMap<TableIndex, TableStyle>
) -> Result<PrimaryMap<LocalTableIndex, Arc<dyn Table>>, LinkError>
&self,
module: &ModuleInfo,
table_styles: &PrimaryMap<TableIndex, TableStyle>
) -> Result<PrimaryMap<LocalTableIndex, Arc<dyn Table>>, LinkError>
Allocate memory for just the tables of the current module.
fn create_globals(
&self,
module: &ModuleInfo
) -> Result<PrimaryMap<LocalGlobalIndex, Arc<Global>>, LinkError>
&self,
module: &ModuleInfo
) -> Result<PrimaryMap<LocalGlobalIndex, Arc<Global>>, LinkError>
Allocate memory for just the globals of the current module, with initializers applied.