Skip to content

Commit

Permalink
Merge pull request #3456 from marc2332/patch-1
Browse files Browse the repository at this point in the history
Fix wasmer-rust readme example
  • Loading branch information
syrusakbary authored Jan 4, 2023
2 parents 8753756 + 2bbc893 commit 0e81d2f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ fn main() -> anyhow::Result<()> {
let module = Module::new(&store, &module_wat)?;
// The module doesn't import anything, so we create an empty import object.
let import_object = imports! {};
let instance = Instance::new(&module, &import_object)?;
let instance = Instance::new(&mut store, &module, &import_object)?;

let add_one = instance.exports.get_function("add_one")?;
let result = add_one.call(&[Value::I32(42)])?;
let result = add_one.call(&mut store, &[Value::I32(42)])?;
assert_eq!(result[0], Value::I32(43));

Ok(())
Expand Down

0 comments on commit 0e81d2f

Please sign in to comment.