Struct wasmer::UniversalEngine [−][src]
pub struct UniversalEngine { /* fields omitted */ }
Expand description
A WebAssembly Universal
Engine.
Implementations
impl UniversalEngine
[src]
impl UniversalEngine
[src]pub fn new(
compiler: Box<dyn Compiler + 'static, Global>,
target: Target,
features: Features
) -> UniversalEngine
[src]
pub fn new(
compiler: Box<dyn Compiler + 'static, Global>,
target: Target,
features: Features
) -> UniversalEngine
[src]Create a new UniversalEngine
with the given config
pub fn headless() -> UniversalEngine
[src]
pub fn headless() -> UniversalEngine
[src]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
[src]
impl Clone for UniversalEngine
[src]pub fn clone(&self) -> UniversalEngine
[src]
pub fn clone(&self) -> UniversalEngine
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl Engine for UniversalEngine
[src]
impl Engine for UniversalEngine
[src]pub fn register_signature(
&self,
func_type: &FunctionType
) -> VMSharedSignatureIndex
[src]
pub fn register_signature(
&self,
func_type: &FunctionType
) -> VMSharedSignatureIndex
[src]Register a signature
pub fn lookup_signature(
&self,
sig: VMSharedSignatureIndex
) -> Option<FunctionType>
[src]
pub fn lookup_signature(
&self,
sig: VMSharedSignatureIndex
) -> Option<FunctionType>
[src]Lookup a signature
pub fn validate(&self, binary: &[u8]) -> Result<(), CompileError>
[src]
pub fn validate(&self, binary: &[u8]) -> Result<(), CompileError>
[src]Validates a WebAssembly module
pub fn compile(
&self,
binary: &[u8],
tunables: &dyn Tunables
) -> Result<Arc<dyn Artifact + 'static>, CompileError>
[src]
pub fn compile(
&self,
binary: &[u8],
tunables: &dyn Tunables
) -> Result<Arc<dyn Artifact + 'static>, CompileError>
[src]Compile a WebAssembly binary
pub unsafe fn deserialize(
&self,
bytes: &[u8]
) -> Result<Arc<dyn Artifact + 'static>, DeserializeError>
[src]
pub unsafe fn deserialize(
&self,
bytes: &[u8]
) -> Result<Arc<dyn Artifact + 'static>, DeserializeError>
[src]Deserializes a WebAssembly module
pub fn register_function_metadata(
&self,
func_data: VMCallerCheckedAnyfunc
) -> VMFuncRef
[src]
pub fn register_function_metadata(
&self,
func_data: VMCallerCheckedAnyfunc
) -> VMFuncRef
[src]Register a function’s data.
unsafe fn deserialize_from_file(
&self,
file_ref: &Path
) -> Result<Arc<dyn Artifact + 'static>, DeserializeError>
[src]
unsafe fn deserialize_from_file(
&self,
file_ref: &Path
) -> Result<Arc<dyn Artifact + 'static>, DeserializeError>
[src]Deserializes a WebAssembly module from a path Read more
impl MemoryUsage for UniversalEngine
[src]
impl MemoryUsage for UniversalEngine
[src]pub fn size_of_val(&self, visited: &mut dyn MemoryUsageTracker) -> usize
[src]
pub fn size_of_val(&self, visited: &mut dyn MemoryUsageTracker) -> usize
[src]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
impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
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.
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> Pointable for T
impl<T> Pointable for T
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more