Struct wasmtime_environ::Tunables
source · pub struct Tunables {Show 14 fields
pub static_memory_bound: u64,
pub static_memory_offset_guard_size: u64,
pub dynamic_memory_offset_guard_size: u64,
pub dynamic_memory_growth_reserve: u64,
pub generate_native_debuginfo: bool,
pub parse_wasm_debuginfo: bool,
pub consume_fuel: bool,
pub epoch_interruption: bool,
pub static_memory_bound_is_maximum: bool,
pub guard_before_linear_memory: bool,
pub generate_address_map: bool,
pub debug_adapter_modules: bool,
pub relaxed_simd_deterministic: bool,
pub tail_callable: bool,
}
Expand description
Tunable parameters for WebAssembly compilation.
Fields§
§static_memory_bound: u64
For static heaps, the size in wasm pages of the heap protected by bounds checking.
static_memory_offset_guard_size: u64
The size in bytes of the offset guard for static heaps.
dynamic_memory_offset_guard_size: u64
The size in bytes of the offset guard for dynamic heaps.
dynamic_memory_growth_reserve: u64
The size, in bytes, of reserved memory at the end of a “dynamic” memory,
before the guard page, that memory can grow into. This is intended to
amortize the cost of memory.grow
in the same manner that Vec<T>
has
space not in use to grow into.
generate_native_debuginfo: bool
Whether or not to generate native DWARF debug information.
parse_wasm_debuginfo: bool
Whether or not to retain DWARF sections in compiled modules.
consume_fuel: bool
Whether or not fuel is enabled for generated code, meaning that fuel will be consumed every time a wasm instruction is executed.
epoch_interruption: bool
Whether or not we use epoch-based interruption.
static_memory_bound_is_maximum: bool
Whether or not to treat the static memory bound as the maximum for unbounded heaps.
guard_before_linear_memory: bool
Whether or not linear memory allocations will have a guard region at the beginning of the allocation in addition to the end.
generate_address_map: bool
Indicates whether an address map from compiled native code back to wasm offsets in the original file is generated.
debug_adapter_modules: bool
Flag for the component module whether adapter modules have debug assertions baked into them.
relaxed_simd_deterministic: bool
Whether or not lowerings for relaxed simd instructions are forced to be deterministic.
tail_callable: bool
Whether or not Wasm functions can be tail-called or not.
Implementations§
source§impl Tunables
impl Tunables
sourcepub fn default_host() -> Self
pub fn default_host() -> Self
Returns a Tunables
configuration assumed for running code on the host.
sourcepub fn default_for_target(target: &Triple) -> Result<Self>
pub fn default_for_target(target: &Triple) -> Result<Self>
Returns the default set of tunables for the given target triple.
sourcepub fn default_miri() -> Tunables
pub fn default_miri() -> Tunables
Returns the default set of tunables for running under MIRI.
sourcepub fn default_u32() -> Tunables
pub fn default_u32() -> Tunables
Returns the default set of tunables for running under a 32-bit host.
sourcepub fn default_u64() -> Tunables
pub fn default_u64() -> Tunables
Returns the default set of tunables for running under a 64-bit host.