Skip to content

Commit

Permalink
Build: Updates wazero to its first beta
Browse files Browse the repository at this point in the history
This updates to the first beta release of [wazero](https://wazero.io): 1.0.0-beta.1

Future betas will release at the end of each month until 1.0 in February 2023.

Note: [Release notes](https://github.com/tetratelabs/wazero/releases) will be posted in the next day or two.

Meanwhile, we've also opened a [gophers slack](https://gophers.slack.com/) `#wazero` channel for support, updates and conversation! Note: You may need an [invite](https://invite.slack.golangbridge.org/) to join gophers.

PS There's no requirement to update TinyGo, just I noticed it was not
latest.

Signed-off-by: Adrian Cole <adrian@tetrate.io>
  • Loading branch information
codefromthecrypt committed Aug 30, 2022
1 parent db67f16 commit d84006f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Expand Up @@ -11,7 +11,7 @@ on:
pull_request:
env:
GO_VERSION: "1.18"
TINYGO_VERSION: "0.24.0"
TINYGO_VERSION: "0.25.0"
jobs:
test:
name: Test
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Expand Up @@ -58,7 +58,7 @@ require (
github.com/spf13/viper v1.12.0
github.com/stretchr/testify v1.8.0
github.com/testcontainers/testcontainers-go v0.13.0
github.com/tetratelabs/wazero v0.0.0-20220701105919-891761ac1ee2
github.com/tetratelabs/wazero v1.0.0-beta.1
github.com/twitchtv/twirp v8.1.2+incompatible
github.com/xlab/treeprint v1.1.0
go.etcd.io/bbolt v1.3.6
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Expand Up @@ -1556,8 +1556,8 @@ github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG
github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I=
github.com/testcontainers/testcontainers-go v0.13.0 h1:OUujSlEGsXVo/ykPVZk3KanBNGN0TYb/7oKIPVn15JA=
github.com/testcontainers/testcontainers-go v0.13.0/go.mod h1:z1abufU633Eb/FmSBTzV6ntZAC1eZBYPtaFsn4nPuDk=
github.com/tetratelabs/wazero v0.0.0-20220701105919-891761ac1ee2 h1:mm9H2anFWwJE64jUuvKr6CbJzupcUcec+AScrdgxtbY=
github.com/tetratelabs/wazero v0.0.0-20220701105919-891761ac1ee2/go.mod h1:Y4X/zO4sC2dJjZG9GDYNRbJGogfqFYJY/BbyKlOxXGI=
github.com/tetratelabs/wazero v1.0.0-beta.1 h1:O5DZxiXG0WUUjuq4dwomA5gODRNnzF8LzQ+UOqGY5kY=
github.com/tetratelabs/wazero v1.0.0-beta.1/go.mod h1:CD5smBN5rGZo7UNe8aUiWyYE3bDWED/CQSonog9NSEg=
github.com/thoas/go-funk v0.9.1 h1:O549iLZqPpTUQ10ykd26sZhzD+rmR5pWhuElrhbC20M=
github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
Expand Down
10 changes: 3 additions & 7 deletions pkg/module/module.go
Expand Up @@ -84,15 +84,11 @@ type Manager struct {
func NewManager(ctx context.Context) (*Manager, error) {
m := &Manager{}

// The runtime must enable the following features because Tinygo uses these features to build.
// cf. https://github.com/tinygo-org/tinygo/blob/b65447c7d567eea495805656f45472cc3c483e03/targets/wasi.json#L4
c := wazero.NewRuntimeConfig().
WithFeatureBulkMemoryOperations(true).
WithFeatureNonTrappingFloatToIntConversion(true).
WithFeatureSignExtensionOps(true)
// WebAssembly 2.0 allows use of any version of TinyGo, including 0.24+.
c := wazero.NewRuntimeConfig().WithWasmCore2()

// Create a new WebAssembly Runtime.
m.runtime = wazero.NewRuntimeWithConfig(c)
m.runtime = wazero.NewRuntimeWithConfig(ctx, c)

// Load WASM modules in local
if err := m.loadModules(ctx); err != nil {
Expand Down

0 comments on commit d84006f

Please sign in to comment.