Struct wasmer_engine_universal::UniversalEngine
source · [−]pub struct UniversalEngine { /* private fields */ }
Expand description
A WebAssembly Universal
Engine.
Implementations
sourceimpl UniversalEngine
impl UniversalEngine
sourcepub fn headless() -> Self
pub fn headless() -> Self
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
).
sourcepub fn load_universal_executable(
&self,
executable: &UniversalExecutable
) -> Result<UniversalArtifact, CompileError>
pub fn load_universal_executable(
&self,
executable: &UniversalExecutable
) -> Result<UniversalArtifact, CompileError>
Load a UniversalExecutable
with this engine.
sourcepub fn load_universal_executable_ref(
&self,
executable: &UniversalExecutableRef<'_>
) -> Result<UniversalArtifact, CompileError>
pub fn load_universal_executable_ref(
&self,
executable: &UniversalExecutableRef<'_>
) -> Result<UniversalArtifact, CompileError>
Load a UniversalExecutableRef
with this engine.
Trait Implementations
sourceimpl Clone for UniversalEngine
impl Clone for UniversalEngine
sourcefn clone(&self) -> UniversalEngine
fn clone(&self) -> UniversalEngine
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Engine for UniversalEngine
impl Engine for UniversalEngine
sourcefn register_signature(
&self,
func_type: FunctionTypeRef<'_>
) -> VMSharedSignatureIndex
fn register_signature(
&self,
func_type: FunctionTypeRef<'_>
) -> VMSharedSignatureIndex
Register a signature
sourcefn lookup_signature(&self, sig: VMSharedSignatureIndex) -> Option<FunctionType>
fn lookup_signature(&self, sig: VMSharedSignatureIndex) -> Option<FunctionType>
Lookup a signature
sourcefn register_function_metadata(
&self,
func_data: VMCallerCheckedAnyfunc
) -> VMFuncRef
fn register_function_metadata(
&self,
func_data: VMCallerCheckedAnyfunc
) -> VMFuncRef
Register a function’s data.
sourcefn compile(
&self,
binary: &[u8],
tunables: &dyn Tunables
) -> Result<Box<dyn Executable>, CompileError>
fn compile(
&self,
binary: &[u8],
tunables: &dyn Tunables
) -> Result<Box<dyn Executable>, CompileError>
Compile a WebAssembly binary
sourcefn load(
&self,
executable: &dyn Executable
) -> Result<Arc<dyn Artifact>, CompileError>
fn load(
&self,
executable: &dyn Executable
) -> Result<Arc<dyn Artifact>, CompileError>
Load a compiled executable with this engine.
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
sourceimpl<T> ArchivePointee for T
impl<T> ArchivePointee for T
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
sourcefn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<F, W, T, D> Deserialize<With<T, W>, D> for F where
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for F where
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more