Struct wasmtime::ModuleLimits [−][src]
pub struct ModuleLimits { pub imported_functions: u32, pub imported_tables: u32, pub imported_memories: u32, pub imported_globals: u32, pub types: u32, pub functions: u32, pub tables: u32, pub memories: u32, pub globals: u32, pub table_elements: u32, pub memory_pages: u32, }
Expand description
Represents the limits placed on a module for compiling with the pooling instance allocation strategy.
Fields
imported_functions: u32
The maximum number of imported functions for a module (default is 1000).
imported_tables: u32
The maximum number of imported tables for a module (default is 0).
imported_memories: u32
The maximum number of imported linear memories for a module (default is 0).
imported_globals: u32
The maximum number of imported globals for a module (default is 0).
types: u32
The maximum number of defined types for a module (default is 100).
functions: u32
The maximum number of defined functions for a module (default is 10000).
tables: u32
The maximum number of defined tables for a module (default is 1).
memories: u32
The maximum number of defined linear memories for a module (default is 1).
globals: u32
The maximum number of defined globals for a module (default is 10).
table_elements: u32
The maximum table elements for any table defined in a module (default is 10000).
If a table’s minimum element limit is greater than this value, the module will fail to compile.
If a table’s maximum element limit is unbounded or greater than this value,
the maximum will be table_elements
for the purpose of any table.grow
instruction.
memory_pages: u32
The maximum number of pages for any linear memory defined in a module (default is 160).
The default of 160 means at most 10 MiB of host memory may be committed for each instance.
If a memory’s minimum page limit is greater than this value, the module will fail to compile.
If a memory’s maximum page limit is unbounded or greater than this value,
the maximum will be memory_pages
for the purpose of any memory.grow
instruction.
This value cannot exceed any memory reservation size limits placed on instances.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ModuleLimits
impl Send for ModuleLimits
impl Sync for ModuleLimits
impl Unpin for ModuleLimits
impl UnwindSafe for ModuleLimits
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V