Struct wasmer::BaseTunables[][src]

pub struct BaseTunables {
    pub static_memory_bound: Pages,
    pub static_memory_offset_guard_size: u64,
    pub dynamic_memory_offset_guard_size: u64,
}
Expand description

Tunable parameters for WebAssembly compilation. This is the reference implementation of the Tunables trait, used by default.

You can use this as a template for creating a custom Tunables implementation or use composition to wrap your Tunables around this one. The later approach is demonstrated in the tunables-limit-memory example.

Fields

static_memory_bound: Pages

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.

Implementations

Get the BaseTunables for a specific Target

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Returns the size of the referenced value in bytes. Read more

Get a MemoryStyle for the provided MemoryType

Get a TableStyle for the provided TableType.

Create a memory owned by the host given a MemoryType and a MemoryStyle.

Create a memory owned by the VM given a MemoryType and a MemoryStyle.

Safety

  • vm_definition_location must point to a valid, owned VMMemoryDefinition, for example in VMContext.

Create a table owned by the host given a TableType and a TableStyle.

Create a table owned by the VM given a TableType and a TableStyle.

Safety

  • vm_definition_location must point to a valid, owned VMTableDefinition, for example in VMContext.

Create a global with an unset value.

Allocate memory for just the memories of the current module.

Allocate memory for just the tables of the current module.

Allocate memory for just the globals of the current module, with initializers applied. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

The archived version of the pointer metadata for this type.

Converts some archived metadata to the pointer metadata for itself.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type for metadata in pointers and references to Self.

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.