(engine: &Engine)
| 11 | } |
| 12 | |
| 13 | fn 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] |
| 30 | fn loops_interruptible() -> wasmtime::Result<()> { |