summaryrefslogtreecommitdiff
path: root/crates/benchmarks/benches/fibonacci.rs
diff options
context:
space:
mode:
authorHenry Gressmann <mail@henrygressmann.de>2024-02-27 17:04:23 +0100
committerGitHub <noreply@github.com>2024-02-27 17:04:23 +0100
commitab2ae9b445268d503bde3dbb7a91886c55c19144 (patch)
treeb2644fc05d37b320035a2997867de61f804f5b6c /crates/benchmarks/benches/fibonacci.rs
parent43e6d23ae8806c813dd5fa0663c17c1772ebf5a8 (diff)
parent417bb70c0f8c8f8781f675481e5336affd209183 (diff)
feat: rework instructions (#4)
Diffstat (limited to 'crates/benchmarks/benches/fibonacci.rs')
-rw-r--r--crates/benchmarks/benches/fibonacci.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/benchmarks/benches/fibonacci.rs b/crates/benchmarks/benches/fibonacci.rs
index 38bbde9..8a4dab2 100644
--- a/crates/benchmarks/benches/fibonacci.rs
+++ b/crates/benchmarks/benches/fibonacci.rs
@@ -17,10 +17,10 @@ fn run_wasmi(wasm: &[u8], iterations: i32, name: &str) {
fn run_wasmer(wasm: &[u8], iterations: i32, name: &str) {
use wasmer::*;
- let engine: Engine = wasmer::Singlepass::default().into();
- let mut store = Store::default();
+ let compiler = wasmer::Singlepass::default();
+ let mut store = Store::new(compiler);
let import_object = imports! {};
- let module = wasmer::Module::from_binary(&engine, wasm).expect("wasmer::Module::from_binary");
+ let module = wasmer::Module::from_binary(&store, wasm).expect("wasmer::Module::from_binary");
let instance = Instance::new(&mut store, &module, &import_object).expect("Instance::new");
let fib = instance.exports.get_typed_function::<i32, i32>(&store, name).expect("get_function");
fib.call(&mut store, iterations).expect("call");