pub struct Engine(_);
Expand description
The engine type
Implementations§
source§impl Engine
impl Engine
sourcepub fn cloned(&self) -> Self
👎Deprecated since 3.2.0: engine.cloned() has been deprecated in favor of engine.clone()
pub fn cloned(&self) -> Self
Returns the Engine
.
sourcepub fn deterministic_id(&self) -> &str
pub fn deterministic_id(&self) -> &str
Returns the deterministic id of this engine
sourcepub fn new(
compiler_config: Box<dyn CompilerConfig>,
target: Target,
features: Features
) -> Self
👎Deprecated since 3.2.0
pub fn new( compiler_config: Box<dyn CompilerConfig>, target: Target, features: Features ) -> Self
Create a new Engine
with the given config
sourcepub fn headless() -> Self
pub fn headless() -> Self
Create a headless Engine
Will be removed in 4.0 in favor of the NativeEngineExt trait
sourcepub fn inner(&self) -> MutexGuard<'_, EngineInner>
👎Deprecated since 3.2.0
pub fn inner(&self) -> MutexGuard<'_, EngineInner>
Get reference to EngineInner
.
sourcepub fn inner_mut(&self) -> MutexGuard<'_, EngineInner>
👎Deprecated since 3.2.0
pub fn inner_mut(&self) -> MutexGuard<'_, EngineInner>
Get mutable reference to EngineInner
.
sourcepub fn target(&self) -> &Target
pub fn target(&self) -> &Target
Gets the target Will be removed in 4.0 in favor of the NativeEngineExt trait
sourcepub fn register_signature(
&self,
func_type: &FunctionType
) -> VMSharedSignatureIndex
👎Deprecated since 3.2.0
pub fn register_signature( &self, func_type: &FunctionType ) -> VMSharedSignatureIndex
Register a signature
sourcepub fn lookup_signature(
&self,
sig: VMSharedSignatureIndex
) -> Option<FunctionType>
👎Deprecated since 3.2.0
pub fn lookup_signature( &self, sig: VMSharedSignatureIndex ) -> Option<FunctionType>
Lookup a signature
sourcepub fn validate(&self, binary: &[u8]) -> Result<(), CompileError>
👎Deprecated since 3.2.0
pub fn validate(&self, binary: &[u8]) -> Result<(), CompileError>
Validates a WebAssembly module
sourcepub fn compile(&self, binary: &[u8]) -> Result<Arc<Artifact>, CompileError>
👎Deprecated since 3.2.0
pub fn compile(&self, binary: &[u8]) -> Result<Arc<Artifact>, CompileError>
Compile a WebAssembly binary
sourcepub unsafe fn deserialize(
&self,
bytes: &[u8]
) -> Result<Arc<Artifact>, DeserializeError>
👎Deprecated since 3.2.0
pub unsafe fn deserialize( &self, bytes: &[u8] ) -> Result<Arc<Artifact>, DeserializeError>
Deserializes a WebAssembly module
Safety
The serialized content must represent a serialized WebAssembly module.
sourcepub unsafe fn deserialize_from_file(
&self,
file_ref: &Path
) -> Result<Arc<Artifact>, DeserializeError>
👎Deprecated since 3.2.0
pub unsafe fn deserialize_from_file( &self, file_ref: &Path ) -> Result<Arc<Artifact>, DeserializeError>
Deserializes a WebAssembly module from a path
Safety
The file’s content must represent a serialized WebAssembly module.
sourcepub fn id(&self) -> &str
👎Deprecated since 3.2.0: Use Engine::deterministic_id()
pub fn id(&self) -> &str
A unique identifier for this object.
This exists to allow us to compare two Engines for equality. Otherwise, comparing two trait objects unsafely relies on implementation details of trait representation.
sourcepub fn set_tunables(&mut self, tunables: impl Tunables + Send + Sync + 'static)
pub fn set_tunables(&mut self, tunables: impl Tunables + Send + Sync + 'static)
Attach a Tunable to this engine Will be removed in 4.0 in favor of the NativeEngineExt trait
Trait Implementations§
source§impl AsEngineRef for Engine
impl AsEngineRef for Engine
source§fn as_engine_ref(&self) -> EngineRef<'_>
fn as_engine_ref(&self) -> EngineRef<'_>
EngineRef
pointing to the underlying context.