MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / store_limits

Method store_limits

src/common.rs:153–175  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

151
152impl RunCommon {
153 pub fn store_limits(&self) -> StoreLimits {
154 let mut limits = StoreLimitsBuilder::new();
155 if let Some(max) = self.common.wasm.max_memory_size {
156 limits = limits.memory_size(max);
157 }
158 if let Some(max) = self.common.wasm.max_table_elements {
159 limits = limits.table_elements(max);
160 }
161 if let Some(max) = self.common.wasm.max_instances {
162 limits = limits.instances(max);
163 }
164 if let Some(max) = self.common.wasm.max_tables {
165 limits = limits.tables(max);
166 }
167 if let Some(max) = self.common.wasm.max_memories {
168 limits = limits.memories(max);
169 }
170 if let Some(enable) = self.common.wasm.trap_on_grow_failure {
171 limits = limits.trap_on_grow_failure(enable);
172 }
173
174 limits.build()
175 }
176
177 pub fn ensure_allow_precompiled(&self) -> Result<()> {
178 if self.allow_precompiled {

Callers 2

new_storeMethod · 0.80
new_store_and_linkerMethod · 0.80

Calls 8

memory_sizeMethod · 0.80
trap_on_grow_failureMethod · 0.80
newFunction · 0.50
table_elementsMethod · 0.45
instancesMethod · 0.45
tablesMethod · 0.45
memoriesMethod · 0.45
buildMethod · 0.45

Tested by

no test coverage detected