Trait wasmer::CompilerConfig[][src]

pub trait CompilerConfig {
    fn compiler(self: Box<Self, Global>) -> Box<dyn Compiler + 'static, Global>;
fn push_middleware(
        &mut self,
        middleware: Arc<dyn ModuleMiddleware + 'static>
    ); 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, Global>) -> Box<dyn Compiler + 'static, Global>[src]

Gets the custom compiler config

fn push_middleware(&mut self, middleware: Arc<dyn ModuleMiddleware + 'static>)[src]

Pushes a middleware onto the back of the middleware chain.

Provided methods

fn enable_pic(&mut self)[src]

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)[src]

Enable compiler IR verification.

For compilers capable of doing so, this enables internal consistency checking.

fn enable_nan_canonicalization(&mut self)[src]

👎 Deprecated:

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)[src]

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[src]

Gets the default features for this compiler in the given target

Implementors

impl CompilerConfig for Cranelift[src]

pub fn compiler(
    self: Box<Cranelift, Global>
) -> Box<dyn Compiler + 'static, Global>
[src]

Transform it into the compiler

pub fn push_middleware(
    &mut self,
    middleware: Arc<dyn ModuleMiddleware + 'static>
)
[src]

Pushes a middleware onto the back of the middleware chain.

pub fn enable_pic(&mut self)[src]

pub fn enable_verifier(&mut self)[src]

pub fn enable_nan_canonicalization(&mut self)[src]

👎 Deprecated:

Please use the canonicalize_nans instead

pub fn canonicalize_nans(&mut self, enable: bool)[src]