Struct wasmer_engine_staticlib::StaticlibArtifact [−][src]
pub struct StaticlibArtifact { /* fields omitted */ }
Expand description
A compiled wasm module, ready to be instantiated.
Implementations
Check if the provided bytes look like StaticlibArtifact
.
This means, if the bytes look like a static object file in the target system.
Get the default extension when serializing this artifact
pub fn from_parts_crosscompiled(
engine_inner: &mut StaticlibEngineInner,
metadata: ModuleMetadata,
module_bytes: Vec<u8>,
metadata_length: usize
) -> Result<Self, CompileError>
pub fn from_parts_crosscompiled(
engine_inner: &mut StaticlibEngineInner,
metadata: ModuleMetadata,
module_bytes: Vec<u8>,
metadata_length: usize
) -> Result<Self, CompileError>
Construct a StaticlibArtifact
from component parts.
Compile a data buffer into a StaticlibArtifact
, which may then be instantiated.
pub unsafe fn deserialize(
engine: &StaticlibEngine,
bytes: &[u8]
) -> Result<Self, DeserializeError>
pub unsafe fn deserialize(
engine: &StaticlibEngine,
bytes: &[u8]
) -> Result<Self, DeserializeError>
Deserialize a StaticlibArtifact
from bytes.
Safety
The bytes must represent a serialized WebAssembly module.
Get the SymbolRegistry
used to generate the names used in the Artifact.
The length in bytes of the metadata in the serialized output.
Trait Implementations
Return a reference-counted pointer to the module
Return a pointer to a module.
Gets a mutable reference to the info. Read more
Register thie Artifact
stack frame information into the global scope. Read more
Returns the CPU features for this Artifact
Returns data initializers to pass to InstanceHandle::initialize
Returns the memory styles associated with this Artifact
.
Returns the table plans associated with this Artifact
.
Returns the functions allocated in memory or this Artifact
ready to be run. Read more
Returns the function call trampolines allocated in memory of this
Artifact
, ready to be run. Read more
fn finished_dynamic_function_trampolines(
&self
) -> &BoxedSlice<FunctionIndex, FunctionBodyPtr>
fn finished_dynamic_function_trampolines(
&self
) -> &BoxedSlice<FunctionIndex, FunctionBodyPtr>
Returns the dynamic function trampolines allocated in memory
of this Artifact
, ready to be run. Read more
Returns the associated VM signatures for this Artifact
.
Get the func data registry
Do preinstantiation logic that is executed before instantiating
Serializes an artifact into a file path
unsafe fn instantiate(
&self,
tunables: &dyn Tunables,
resolver: &dyn Resolver,
host_state: Box<dyn Any + 'static, Global>
) -> Result<InstanceHandle, InstantiationError>
unsafe fn instantiate(
&self,
tunables: &dyn Tunables,
resolver: &dyn Resolver,
host_state: Box<dyn Any + 'static, Global>
) -> Result<InstanceHandle, InstantiationError>
Crate an Instance
from this Artifact
. Read more
unsafe fn finish_instantiation(
&self,
trap_handler: &dyn TrapHandler,
handle: &InstanceHandle
) -> Result<(), InstantiationError>
unsafe fn finish_instantiation(
&self,
trap_handler: &dyn TrapHandler,
handle: &InstanceHandle
) -> Result<(), InstantiationError>
Finishes the instantiation of a just created InstanceHandle
. Read more
Returns the size of the referenced value in bytes. Read more
Auto Trait Implementations
impl RefUnwindSafe for StaticlibArtifact
impl Send for StaticlibArtifact
impl Sync for StaticlibArtifact
impl Unpin for StaticlibArtifact
impl UnwindSafe for StaticlibArtifact
Blanket Implementations
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
pub fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
pub fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
Mutably borrows from an owned value. Read more
pub fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
pub fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more