Struct wasmer_engine_dylib::DylibArtifact [−][src]
pub struct DylibArtifact { /* fields omitted */ }
Expand description
A compiled Wasm module, ready to be instantiated.
Implementations
Check if the provided bytes look like DylibArtifact
.
This means, if the bytes look like a shared object file in the target system.
Get the default extension when serializing this artifact
pub fn from_parts_crosscompiled(
metadata: ModuleMetadata,
dylib_path: PathBuf
) -> Result<Self, CompileError>
[src]
pub fn from_parts_crosscompiled(
metadata: ModuleMetadata,
dylib_path: PathBuf
) -> Result<Self, CompileError>
[src]Construct a DylibArtifact
from component parts.
pub fn from_parts(
engine_inner: &mut DylibEngineInner,
metadata: ModuleMetadata,
dylib_path: PathBuf,
lib: Library
) -> Result<Self, CompileError>
[src]
pub fn from_parts(
engine_inner: &mut DylibEngineInner,
metadata: ModuleMetadata,
dylib_path: PathBuf,
lib: Library
) -> Result<Self, CompileError>
[src]Construct a DylibArtifact
from component parts.
Compile a data buffer into a DylibArtifact
, which may
then be instantiated.
pub unsafe fn deserialize(
engine: &DylibEngine,
bytes: &[u8]
) -> Result<Self, DeserializeError>
[src]
pub unsafe fn deserialize(
engine: &DylibEngine,
bytes: &[u8]
) -> Result<Self, DeserializeError>
[src]Deserialize a DylibArtifact
from bytes.
Safety
The bytes must represent a serialized WebAssembly module.
pub unsafe fn deserialize_from_file(
engine: &DylibEngine,
path: &Path
) -> Result<Self, DeserializeError>
[src]
pub unsafe fn deserialize_from_file(
engine: &DylibEngine,
path: &Path
) -> Result<Self, DeserializeError>
[src]Deserialize a DylibArtifact
from a file path.
Safety
The file’s content must represent a serialized WebAssembly module.
pub unsafe fn deserialize_from_file_unchecked(
engine: &DylibEngine,
path: &Path
) -> Result<Self, DeserializeError>
[src]
pub unsafe fn deserialize_from_file_unchecked(
engine: &DylibEngine,
path: &Path
) -> Result<Self, DeserializeError>
[src]Deserialize a DylibArtifact
from a file path (unchecked).
Safety
The file’s content must represent a serialized WebAssembly module.
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 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>
[src]
fn finished_dynamic_function_trampolines(
&self
) -> &BoxedSlice<FunctionIndex, FunctionBodyPtr>
[src]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>
[src]
unsafe fn instantiate(
&self,
tunables: &dyn Tunables,
resolver: &dyn Resolver,
host_state: Box<dyn Any + 'static, Global>
) -> Result<InstanceHandle, InstantiationError>
[src]Crate an Instance
from this Artifact
. Read more
unsafe fn finish_instantiation(
&self,
trap_handler: &dyn TrapHandler,
handle: &InstanceHandle
) -> Result<(), InstantiationError>
[src]
unsafe fn finish_instantiation(
&self,
trap_handler: &dyn TrapHandler,
handle: &InstanceHandle
) -> Result<(), InstantiationError>
[src]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 DylibArtifact
impl Send for DylibArtifact
impl Sync for DylibArtifact
impl Unpin for DylibArtifact
impl UnwindSafe for DylibArtifact
Blanket Implementations
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Converts some archived metadata to the pointer metadata for itself.
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V