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

Function hugely_recursive_module

tests/all/iloop.rs:13–27  ·  view source on GitHub ↗
(engine: &Engine)

Source from the content-addressed store, hash-verified

11}
12
13fn hugely_recursive_module(engine: &Engine) -> wasmtime::Result<Module> {
14 let mut wat = String::new();
15 wat.push_str(
16 r#"
17 (import "" "" (func))
18 (func (export "loop") call 2 call 2)
19 "#,
20 );
21 for i in 0..100 {
22 wat.push_str(&format!("(func call {0} call {0})\n", i + 3));
23 }
24 wat.push_str("(func call 0)\n");
25
26 Module::new(engine, &wat)
27}
28
29#[test]
30fn loops_interruptible() -> wasmtime::Result<()> {

Callers 2

functions_interruptibleFunction · 0.85

Calls 2

newFunction · 0.50
push_strMethod · 0.45

Tested by 2

functions_interruptibleFunction · 0.68