Trait wasmer_compiler::CompilerConfig
source · [−]pub trait CompilerConfig {
fn compiler(self: Box<Self>) -> Box<dyn Compiler>ⓘNotable traits for Box<R, Global>impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;
;
fn push_middleware(&mut self, middleware: Arc<dyn ModuleMiddleware>);
fn enable_pic(&mut self) { ... }
fn enable_verifier(&mut self) { ... }
fn enable_nan_canonicalization(&mut self) { ... }
fn canonicalize_nans(&mut self, _enable: bool) { ... }
fn default_features_for_target(&self, _target: &Target) -> Features { ... }
}
Expand description
The compiler configuration options.
Required methods
fn compiler(self: Box<Self>) -> Box<dyn Compiler>ⓘNotable traits for Box<R, Global>impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;
fn compiler(self: Box<Self>) -> Box<dyn Compiler>ⓘNotable traits for Box<R, Global>impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;
Gets the custom compiler config
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.
Provided methods
fn enable_pic(&mut self)
fn enable_pic(&mut self)
Enable Position Independent Code (PIC).
This is required for shared object generation (Native Engine), but will make the JIT Engine to fail, since PIC is not yet supported in the JIT linking phase.
fn enable_verifier(&mut self)
fn enable_verifier(&mut self)
Enable compiler IR verification.
For compilers capable of doing so, this enables internal consistency checking.
fn enable_nan_canonicalization(&mut self)
fn enable_nan_canonicalization(&mut self)
Please use the canonicalize_nans instead
Enable NaN canonicalization.
NaN canonicalization is useful when trying to run WebAssembly deterministically across different architectures.
fn canonicalize_nans(&mut self, _enable: bool)
fn canonicalize_nans(&mut self, _enable: bool)
Enable NaN canonicalization.
NaN canonicalization is useful when trying to run WebAssembly deterministically across different architectures.
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