[−][src]Trait wasmer_engine::Artifact
An Artifact
is the product that the Engine
implementation produce and use.
The Artifact
contains the compiled data for a given
module as well as extra information needed to run the
module at runtime, such as ModuleInfo
and Features
.
Required methods
pub fn module(&self) -> Arc<ModuleInfo>
[src]
Return a reference-counted pointer to the module
pub fn module_ref(&self) -> &ModuleInfo
[src]
Return a pointer to a module.
pub fn module_mut(&mut self) -> Option<&mut ModuleInfo>
[src]
Gets a mutable reference to the info.
Note: this will return None
if the module is already instantiated.
pub fn register_frame_info(&self)
[src]
Register thie Artifact
stack frame information into the global scope.
This is required to ensure that any traps can be properly symbolicated.
pub fn features(&self) -> &Features
[src]
Returns the features for this Artifact
pub fn memory_styles(&self) -> &PrimaryMap<MemoryIndex, MemoryStyle>
[src]
Returns the memory styles associated with this Artifact
.
pub fn table_styles(&self) -> &PrimaryMap<TableIndex, TableStyle>
[src]
Returns the table plans associated with this Artifact
.
pub fn data_initializers(&self) -> &[OwnedDataInitializer]
[src]
Returns data initializers to pass to InstanceHandle::initialize
pub fn finished_functions(
&self
) -> &BoxedSlice<LocalFunctionIndex, FunctionBodyPtr>
[src]
&self
) -> &BoxedSlice<LocalFunctionIndex, FunctionBodyPtr>
Returns the functions allocated in memory or this Artifact
ready to be run.
pub fn finished_function_call_trampolines(
&self
) -> &BoxedSlice<SignatureIndex, VMTrampoline>
[src]
&self
) -> &BoxedSlice<SignatureIndex, VMTrampoline>
Returns the function call trampolines allocated in memory of this
Artifact
, ready to be run.
pub fn finished_dynamic_function_trampolines(
&self
) -> &BoxedSlice<FunctionIndex, FunctionBodyPtr>
[src]
&self
) -> &BoxedSlice<FunctionIndex, FunctionBodyPtr>
Returns the dynamic function trampolines allocated in memory
of this Artifact
, ready to be run.
pub fn signatures(&self) -> &BoxedSlice<SignatureIndex, VMSharedSignatureIndex>
[src]
Returns the associated VM signatures for this Artifact
.
pub fn serialize(&self) -> Result<Vec<u8>, SerializeError>
[src]
Serializes an artifact into bytes
Provided methods
pub fn serialize_to_file(&self, path: &Path) -> Result<(), SerializeError>
[src]
Serializes an artifact into a file path
pub fn preinstantiate(&self) -> Result<(), InstantiationError>
[src]
Do preinstantiation logic that is executed before instantiating
pub unsafe fn instantiate(
&self,
tunables: &dyn Tunables,
resolver: &dyn Resolver,
host_state: Box<dyn Any>
) -> Result<InstanceHandle, InstantiationError>
[src]
&self,
tunables: &dyn Tunables,
resolver: &dyn Resolver,
host_state: Box<dyn Any>
) -> Result<InstanceHandle, InstantiationError>
pub unsafe fn finish_instantiation(
&self,
handle: &InstanceHandle
) -> Result<(), InstantiationError>
[src]
&self,
handle: &InstanceHandle
) -> Result<(), InstantiationError>
Finishes the instantiation of a just created InstanceHandle
.
Safety
Implementations
impl dyn Artifact + 'static
[src]
pub fn downcast_ref<T: 'static>(&self) -> Option<&T>
[src]
Try to downcast the artifact into a given type.
pub fn downcast_mut<T: 'static>(&mut self) -> Option<&mut T>
[src]
Try to downcast the artifact into a given type mutably.