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
impl RefUnwindSafe for Config
impl UnwindSafe for Config
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
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
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
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
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
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
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self
The counterpart to unchecked_from
.
pub fn vzip(self) -> V