[][src]Struct wasmtime_api::Config

pub struct Config { /* fields omitted */ }

Global configuration options used to create an Engine and customize its behavior.

This structure exposed a builder-like interface and is primarily consumed by Engine::new()

Implementations

impl Config[src]

pub fn new() -> Config[src]

Creates a new configuration object with the default configuration specified.

pub fn debug_info(&mut self, enable: bool) -> &mut Self[src]

Configures whether DWARF debug information will be emitted during compilation.

By default this option is false.

pub fn flags(&mut self, flags: Flags) -> &mut Self[src]

Configures various flags for compilation such as optimization level and such.

For more information on defaults and configuration options, see the documentation for Flags

pub fn features(&mut self, features: Features) -> &mut Self[src]

Indicates which WebAssembly features are enabled for this compilation session.

By default only stable features are enabled by default (and none are fully stabilized yet at this time). If you're loading wasm modules which may use non-MVP features you'll want to be sure to call this method and enable the appropriate feature in the Features structure.

pub fn strategy(&mut self, strategy: CompilationStrategy) -> &mut Self[src]

Configures the compilation strategy provided, indicating which backend will be used for compiling WebAssembly to native code.

Currently the primary strategies are with cranelift (an optimizing compiler) or lightbeam (a fast single-pass JIT which produces code quickly).

Trait Implementations

impl Clone for Config[src]

impl Default for Config[src]

Auto Trait Implementations

impl RefUnwindSafe for Config

impl Send for Config

impl Sync for Config

impl Unpin for Config

impl UnwindSafe for Config

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.