Skip to content
This repository has been archived by the owner on Nov 9, 2023. It is now read-only.

updates wazero #8

Merged
merged 1 commit into from
Jul 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/birros/wazero-demo
go 1.17

require (
github.com/tetratelabs/wazero v0.0.0-20220510030018-8dd797e108db
github.com/tetratelabs/wazero v0.0.0-20220630052417-63f6b2231142
golang.org/x/mobile v0.0.0-20220307220422-55113b94f09c
)

Expand Down
6 changes: 2 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/tetratelabs/wazero v0.0.0-20220503023851-72f16d21eb4a h1:k9hVyZcNAVhiVp8YE6r2Trji8HD8CHleaQhqHZDXaEM=
github.com/tetratelabs/wazero v0.0.0-20220503023851-72f16d21eb4a/go.mod h1:Y4X/zO4sC2dJjZG9GDYNRbJGogfqFYJY/BbyKlOxXGI=
github.com/tetratelabs/wazero v0.0.0-20220510030018-8dd797e108db h1:HQDOsOFGBdhO6c163iIT0NEod1uenfxTLJWkaUTD42k=
github.com/tetratelabs/wazero v0.0.0-20220510030018-8dd797e108db/go.mod h1:Y4X/zO4sC2dJjZG9GDYNRbJGogfqFYJY/BbyKlOxXGI=
github.com/tetratelabs/wazero v0.0.0-20220630052417-63f6b2231142 h1:ZnK50yYXmYRlAOpOzYw6Xu/QWU2kP8bDeVLQDzQtTas=
github.com/tetratelabs/wazero v0.0.0-20220630052417-63f6b2231142/go.mod h1:Y4X/zO4sC2dJjZG9GDYNRbJGogfqFYJY/BbyKlOxXGI=
github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
Expand Down
6 changes: 3 additions & 3 deletions lib/lib.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"log"

"github.com/tetratelabs/wazero"
"github.com/tetratelabs/wazero/wasi"
"github.com/tetratelabs/wazero/wasi_snapshot_preview1"
)

//go:embed sum.wasm
Expand All @@ -27,11 +27,11 @@ func Start() {
// WASI command (to initialize memory).
// This is required by TinyGo even if the source (../sum/sum.go in this
// case) doesn't directly use I/O or memory.
if _, err := wasi.InstantiateSnapshotPreview1(ctx, runtime); err != nil {
if _, err := wasi_snapshot_preview1.Instantiate(ctx, runtime); err != nil {
log.Panicln(err)
}

module, err := runtime.InstantiateModuleFromCode(ctx, sumWASMBytes)
module, err := runtime.InstantiateModuleFromBinary(ctx, sumWASMBytes)
if err != nil {
log.Panicln(err)
}
Expand Down