[−][src]Struct wasmtime::Config
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()
Methods
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 wasm_threads(&mut self, enable: bool) -> &mut Self
[src]
Configures whether the WebAssembly threads proposal will be enabled for compilation.
The WebAssembly threads proposal is not currently fully standardized and is undergoing development. Additionally the support in wasmtime itself is still being worked on. Support for this feature can be enabled through this method for appropriate wasm modules.
This feature gates items such as shared memories and atomic instructions.
This is false
by default.
pub fn wasm_reference_types(&mut self, enable: bool) -> &mut Self
[src]
Configures whether the WebAssembly reference types proposal will be enabled for compilation.
The WebAssembly reference types proposal is not currently fully standardized and is undergoing development. Additionally the support in wasmtime itself is still being worked on. Support for this feature can be enabled through this method for appropriate wasm modules.
This feature gates items such as the anyref
type and multiple tables
being in a module.
This is false
by default.
pub fn wasm_simd(&mut self, enable: bool) -> &mut Self
[src]
Configures whether the WebAssembly SIMD proposal will be enabled for compilation.
The WebAssembly SIMD proposal is not currently fully standardized and is undergoing development. Additionally the support in wasmtime itself is still being worked on. Support for this feature can be enabled through this method for appropriate wasm modules.
This feature gates items such as the v128
type and all of its
operators being in a module.
This is false
by default.
pub fn wasm_bulk_memory(&mut self, enable: bool) -> &mut Self
[src]
Configures whether the WebAssembly bulk memory operations proposal will be enabled for compilation.
The WebAssembly bulk memory operations proposal is not currently fully standardized and is undergoing development. Additionally the support in wasmtime itself is still being worked on. Support for this feature can be enabled through this method for appropriate wasm modules.
This feature gates items such as the memory.copy
instruction, passive
data/table segments, etc, being in a module.
This is false
by default.
pub fn wasm_multi_value(&mut self, enable: bool) -> &mut Self
[src]
Configures whether the WebAssembly multi-value proposal will be enabled for compilation.
The WebAssembly multi-value proposal is not currently fully standardized and is undergoing development. Additionally the support in wasmtime itself is still being worked on. Support for this feature can be enabled through this method for appropriate wasm modules.
This feature gates functions and blocks returning multiple values in a module, for example.
This is false
by default.
pub fn strategy(&mut self, strategy: Strategy) -> Result<&mut Self>
[src]
Configures which compilation strategy will be used for wasm modules.
This method can be used to configure which compiler is used for wasm
modules, and for more documentation consult the Strategy
enumeration
and its documentation.
The default value for this is Strategy::Auto
.
Errors
Some compilation strategies require compile-time options of wasmtime
itself to be set, but if they're not set and the strategy is specified
here then an error will be returned.
pub fn cranelift_debug_verifier(&mut self, enable: bool) -> &mut Self
[src]
Configures whether the debug verifier of Cranelift is enabled or not.
When Cranelift is used as a code generation backend this will configure
it to have the enable_verifier
flag which will enable a number of debug
checks inside of Cranelift. This is largely only useful for the
developers of wasmtime itself.
The default value for this is false
pub fn cranelift_opt_level(&mut self, level: OptLevel) -> &mut Self
[src]
Configures the Cranelift code generator optimization level.
When the Cranelift code generator is used you can configure the
optimization level used for generated code in a few various ways. For
more information see the documentation of OptLevel
.
The default value for this is OptLevel::None
.
Trait Implementations
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,