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.

Trait Implementations§

source§

impl Clone for Tunables

source§

fn clone(&self) -> Tunables

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Default for Tunables

source§

fn default() -> Self

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

impl<'de> Deserialize<'de> for Tunables

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Hash for Tunables

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

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

impl Serialize for Tunables

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,