(module: Module, recursive: bool, n: i32)
| 21 | } |
| 22 | |
| 23 | fn fibonacci_run(module: Module, recursive: bool, n: i32) -> Result<()> { |
| 24 | let mut store = Store::default(); |
| 25 | let instance = ModuleInstance::instantiate(&mut store, &module, None)?; |
| 26 | let argon2 = instance.func::<i32, i32>( |
| 27 | &store, |
| 28 | match recursive { |
| 29 | true => "fibonacci_recursive", |
| 30 | false => "fibonacci", |
| 31 | }, |
| 32 | )?; |
| 33 | argon2.call(&mut store, n)?; |
| 34 | Ok(()) |
| 35 | } |
| 36 | |
| 37 | fn criterion_benchmark(c: &mut Criterion) { |
| 38 | let module = fibonacci_parse().expect("fibonacci_parse"); |
no test coverage detected