Skip to content

Commit

Permalink
readme: Update documentation. Fixes #58
Browse files Browse the repository at this point in the history
  • Loading branch information
losfair committed Jan 26, 2019
1 parent 97190fd commit a1118a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Suppose we have already loaded our *.wasm module's bytecode into the variable `v

Lets pass the bytecode into a newly instantiated virtual machine:
```go
vm, err := exec.NewVirtualMachine(input, exec.VMConfig{}, &exec.NopResolver{})
vm, err := exec.NewVirtualMachine(input, exec.VMConfig{}, &exec.NopResolver{}, nil)
if err != nil { // if the wasm bytecode is invalid
panic(err)
}
Expand Down Expand Up @@ -144,7 +144,7 @@ func (r *Resolver) ResolveGlobal(module, field string) int64 {
We can then include the import resolver into our WebAssembly VM:

```go
vm, err := exec.NewVirtualMachine([]byte, exec.VMConfig{}, new(Resolver))
vm, err := exec.NewVirtualMachine(input, exec.VMConfig{}, new(Resolver), nil)
if err != nil {
panic(err)
}
Expand Down

0 comments on commit a1118a9

Please sign in to comment.