Struct sc_executor_wasmtime::Config[][src]

pub struct Config {
    pub heap_pages: u32,
    pub max_memory_pages: Option<u32>,
    pub allow_missing_func_imports: bool,
    pub cache_path: Option<PathBuf>,
    pub semantics: Semantics,
}

Fields

heap_pages: u32

The number of wasm pages to be mounted after instantiation.

max_memory_pages: Option<u32>

The total number of wasm pages an instance can request.

If specified, the runtime will be able to allocate only that much of wasm memory pages. This is the total number and therefore the [heap_pages] is accounted for.

That means that the initial number of pages of a linear memory plus the [heap_pages] should be less or equal to max_memory_pages, otherwise the instance won’t be created.

Moreover, memory.grow will fail (return -1) if the sum of the number of currently mounted pages and the number of additional pages exceeds max_memory_pages.

The default is None.

allow_missing_func_imports: bool

The WebAssembly standard requires all imports of an instantiated module to be resolved, othewise, the instantiation fails. If this option is set to true, then this behavior is overriden and imports that are requested by the module and not provided by the host functions will be resolved using stubs. These stubs will trap upon a call.

cache_path: Option<PathBuf>

A directory in which wasmtime can store its compiled artifacts cache.

semantics: Semantics

Tuning of various semantics of the wasmtime executor.

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

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s. Read more

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s. Read more

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait. 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.

Get a reference to the inner from the outer.

Get a mutable reference to the inner from the outer.

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

Should always be Self

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.

The counterpart to unchecked_from.