Struct wasmer_compiler_cranelift::Cranelift
source · [−]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
sourceimpl 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
sourceimpl CompilerConfig for Cranelift
impl CompilerConfig for Cranelift
sourcefn 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.
sourcefn enable_pic(&mut self)
fn enable_pic(&mut self)
Enable Position Independent Code (PIC). Read more
sourcefn enable_verifier(&mut self)
fn enable_verifier(&mut self)
Enable compiler IR verification. Read more
sourcefn enable_nan_canonicalization(&mut self)
fn enable_nan_canonicalization(&mut self)
Please use the canonicalize_nans instead
Enable NaN canonicalization. Read more
sourcefn canonicalize_nans(&mut self, enable: bool)
fn canonicalize_nans(&mut self, enable: bool)
Enable NaN canonicalization. Read more
sourcefn 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
sourceimpl MemoryUsage for Cranelift
impl MemoryUsage for Cranelift
sourcefn size_of_val(&self, visited: &mut dyn MemoryUsageTracker) -> usize
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 Cranelift
impl Send for Cranelift
impl Sync for Cranelift
impl Unpin for Cranelift
impl !UnwindSafe for Cranelift
Blanket Implementations
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<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more