Struct wasmtime_environ::Tunables[][src]

pub struct Tunables {
    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 interruptable: bool,
    pub consume_fuel: bool,
    pub static_memory_bound_is_maximum: bool,
    pub guard_before_linear_memory: 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.

interruptable: bool

Whether or not to enable the ability to interrupt wasm code dynamically.

More info can be found about the implementation in crates/environ/src/cranelift.rs. Note that you can’t interrupt host calls and interrupts are implemented through the VMInterrupts structure, or InterruptHandle in the wasmtime crate.

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.

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.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.