pub struct Cranelift { /* private fields */ }
Expand description
Global configuration options used to create an
wasmer_engine::Engine
and customize its behavior.
This structure exposes a builder-like interface and is primarily
consumed by wasmer_engine::Engine::new
.
Implementations§
source§impl Cranelift
impl Cranelift
sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new configuration object with the default configuration specified.
sourcepub fn canonicalize_nans(&mut self, enable: bool) -> &mut Self
pub fn canonicalize_nans(&mut self, enable: bool) -> &mut Self
Enable NaN canonicalization.
NaN canonicalization is useful when trying to run WebAssembly deterministically across different architectures.
sourcepub fn opt_level(&mut self, opt_level: CraneliftOptLevel) -> &mut Self
pub fn opt_level(&mut self, opt_level: CraneliftOptLevel) -> &mut Self
The optimization levels when optimizing the IR.
Trait Implementations§
source§impl CompilerConfig for Cranelift
impl CompilerConfig for Cranelift
source§fn push_middleware(&mut self, middleware: Arc<dyn ModuleMiddleware>)
fn push_middleware(&mut self, middleware: Arc<dyn ModuleMiddleware>)
Pushes a middleware onto the back of the middleware chain.
source§fn enable_pic(&mut self)
fn enable_pic(&mut self)
Enable Position Independent Code (PIC). Read more
source§fn enable_verifier(&mut self)
fn enable_verifier(&mut self)
Enable compiler IR verification. Read more
source§fn canonicalize_nans(&mut self, enable: bool)
fn canonicalize_nans(&mut self, enable: bool)
Enable NaN canonicalization. Read more
source§fn default_features_for_target(&self, _target: &Target) -> Features
fn default_features_for_target(&self, _target: &Target) -> Features
Gets the default features for this compiler in the given target
Auto Trait Implementations§
impl Freeze for Cranelift
impl !RefUnwindSafe for Cranelift
impl Send for Cranelift
impl Sync for Cranelift
impl Unpin for Cranelift
impl !UnwindSafe for Cranelift
Blanket Implementations§
source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
source§fn 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.
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> Upcastable for T
impl<T> Upcastable for T
source§fn upcast_any_ref(&self) -> &(dyn Any + 'static)
fn upcast_any_ref(&self) -> &(dyn Any + 'static)
upcast ref
source§fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
upcast mut ref