[−][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. Note that enabling the threads feature will also enable the bulk memory feature.
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. Note that enabling the reference types feature will
also enable the bulk memory feature.
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 profiler(&mut self, profile: ProfilingStrategy) -> Result<&mut Self>
[src]
Creates a default profiler based on the profiling strategy choosen
Profiler creation calls the type's default initializer where the purpose is really just to put in place the type used for profiling.
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
.
pub fn cache_config_load(&mut self, path: impl AsRef<Path>) -> Result<&mut Self>
[src]
Loads cache configuration specified at path
.
This method will read the file specified by path
on the filesystem and
attempt to load cache configuration from it. This method can also fail
due to I/O errors, misconfiguration, syntax errors, etc. For expected
syntax in the configuration file see the documentation online.
By default cache configuration is not enabled or loaded.
Errors
This method can fail due to any error that happens when loading the file
pointed to by path
and attempting to load the cache configuration.
pub fn cache_config_load_default(&mut self) -> Result<&mut Self>
[src]
Loads cache configuration from the system default path.
This commit is the same as Config::cache_config_load
except that it
does not take a path argument and instead loads the default
configuration present on the system. This is located, for example, on
Unix at $HOME/.config/wasmtime/config.toml
and is typically created
with the wasmtime config new
command.
By default cache configuration is not enabled or loaded.
Errors
This method can fail due to any error that happens when loading the default system configuration. Note that it is not an error if the default config file does not exist, in which case the default settings for an enabled cache are applied.
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>,