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

Function successful_instantiation

tests/all/pooling_allocator.rs:5–20  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3
4#[test]
5fn successful_instantiation() -> Result<()> {
6 let pool = crate::small_pool_config();
7 let mut config = Config::new();
8 config.allocation_strategy(pool);
9 config.memory_guard_size(0);
10 config.memory_reservation(1 << 16);
11
12 let engine = Engine::new(&config)?;
13 let module = Module::new(&engine, r#"(module (memory 1) (table 10 funcref))"#)?;
14
15 // Module should instantiate
16 let mut store = Store::new(&engine, ());
17 Instance::new(&mut store, &module, &[])?;
18
19 Ok(())
20}
21
22#[test]
23#[cfg_attr(miri, ignore)]

Callers

nothing calls this directly

Calls 6

OkFunction · 0.85
allocation_strategyMethod · 0.80
small_pool_configFunction · 0.70
newFunction · 0.50
memory_guard_sizeMethod · 0.45
memory_reservationMethod · 0.45

Tested by

no test coverage detected