Struct holochain_wasmer_host::prelude::UniversalEngine [−]
pub struct UniversalEngine { /* fields omitted */ }
Expand description
A WebAssembly Universal
Engine.
Implementations
impl UniversalEngine
impl UniversalEngine
Create a new UniversalEngine
with the given config
pub fn headless() -> UniversalEngine
pub fn headless() -> UniversalEngine
Create a headless UniversalEngine
A headless engine is an engine without any compiler attached. This is useful for assuring a minimal runtime for running WebAssembly modules.
For example, for running in IoT devices where compilers are very expensive, or also to optimize startup speed.
Important
Headless engines can’t compile or validate any modules,
they just take already processed Modules (via Module::serialize
).
Trait Implementations
impl Clone for UniversalEngine
impl Clone for UniversalEngine
pub fn clone(&self) -> UniversalEngine
pub fn clone(&self) -> UniversalEngine
Returns a copy of the value. Read more
Performs copy-assignment from source
. Read more
impl Engine for UniversalEngine
impl Engine for UniversalEngine
pub fn register_signature(
&self,
func_type: &FunctionType
) -> VMSharedSignatureIndex
pub fn register_signature(
&self,
func_type: &FunctionType
) -> VMSharedSignatureIndex
Register a signature
pub fn lookup_signature(
&self,
sig: VMSharedSignatureIndex
) -> Option<FunctionType>
pub fn lookup_signature(
&self,
sig: VMSharedSignatureIndex
) -> Option<FunctionType>
Lookup a signature
Compile a WebAssembly binary
pub unsafe fn deserialize(
&self,
bytes: &[u8]
) -> Result<Arc<dyn Artifact + 'static>, DeserializeError>
pub unsafe fn deserialize(
&self,
bytes: &[u8]
) -> Result<Arc<dyn Artifact + 'static>, DeserializeError>
Deserializes a WebAssembly module
pub fn register_function_metadata(
&self,
func_data: VMCallerCheckedAnyfunc
) -> VMFuncRef
pub fn register_function_metadata(
&self,
func_data: VMCallerCheckedAnyfunc
) -> VMFuncRef
Register a function’s data.
unsafe fn deserialize_from_file(
&self,
file_ref: &Path
) -> Result<Arc<dyn Artifact + 'static>, DeserializeError>
unsafe fn deserialize_from_file(
&self,
file_ref: &Path
) -> Result<Arc<dyn Artifact + 'static>, DeserializeError>
Deserializes a WebAssembly module from a path Read more
impl MemoryUsage for UniversalEngine
impl MemoryUsage for UniversalEngine
pub fn size_of_val(&self, visited: &mut dyn MemoryUsageTracker) -> usize
pub fn size_of_val(&self, visited: &mut dyn MemoryUsageTracker) -> usize
Returns the size of the referenced value in bytes. Read more
Auto Trait Implementations
impl RefUnwindSafe for UniversalEngine
impl Send for UniversalEngine
impl Sync for UniversalEngine
impl Unpin for UniversalEngine
impl UnwindSafe for UniversalEngine
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
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V