Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to wazero 1.7.1 #86

Merged
merged 6 commits into from
Apr 16, 2024
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
7 changes: 2 additions & 5 deletions .github/workflows/bench.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,10 @@ jobs:
bench:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v3
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.work
cache: true

- name: setup re2 for cgo
run: sudo apt-get update && sudo apt-get install -y libre2-dev
Expand Down
15 changes: 5 additions & 10 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,10 @@ jobs:
- os: macos-14
mode: tinygo
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v3
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.work
cache: true

- name: setup re2 for cgo (linux)
if: ${{ startsWith(matrix.os, 'ubuntu-') && matrix.mode == 'cgo' }}
Expand All @@ -57,10 +54,10 @@ jobs:
if: ${{ matrix.mode == 'tinygo' }}
uses: acifani/setup-tinygo@v1
with:
tinygo-version: 0.30.0
tinygo-version: 0.31.2
- name: setup wasmtime for tinygo
if: ${{ matrix.mode == 'tinygo' }}
run: go install github.com/wasilibs/tools/cmd/wasmtime@e3baa6a6b2955f731f4490728b09fb87b35e27e9
run: go install github.com/wasilibs/tools/cmd/wasmtime@875fe73f677c58d467ee373a9e00e6cb66b268f3

- name: run checks
run: go run mage.go check
Expand Down Expand Up @@ -97,9 +94,7 @@ jobs:
container:
image: golang:alpine
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/checkout@v4

- run: if command -v gcc &> /dev/null; then echo "GCC found but not expected"; exit 321; fi

Expand Down
5 changes: 2 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
module github.com/wasilibs/go-re2

go 1.18
go 1.20

require (
github.com/magefile/mage v1.14.0
github.com/tetratelabs/wazero v1.7.1
github.com/wasilibs/nottinygc v0.4.0
)

require github.com/tetratelabs/wazero v1.7.0
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
github.com/magefile/mage v1.14.0 h1:6QDX3g6z1YvJ4olPhT1wksUcSa/V0a1B+pJb73fBjyo=
github.com/magefile/mage v1.14.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A=
github.com/tetratelabs/wazero v1.7.0 h1:jg5qPydno59wqjpGrHph81lbtHzTrWzwwtD4cD88+hQ=
github.com/tetratelabs/wazero v1.7.0/go.mod h1:ytl6Zuh20R/eROuyDaGPkp82O9C/DJfXAwJfQ3X6/7Y=
github.com/tetratelabs/wazero v1.7.1 h1:QtSfd6KLc41DIMpDYlJdoMc6k7QTN246DM2+n2Y/Dx8=
github.com/tetratelabs/wazero v1.7.1/go.mod h1:ytl6Zuh20R/eROuyDaGPkp82O9C/DJfXAwJfQ3X6/7Y=
github.com/wasilibs/nottinygc v0.4.0 h1:h1TJMihMC4neN6Zq+WKpLxgd9xCFMw7O9ETLwY2exJQ=
github.com/wasilibs/nottinygc v0.4.0/go.mod h1:oDcIotskuYNMpqMF23l7Z8uzD4TC0WXHK8jetlB3HIo=
2 changes: 1 addition & 1 deletion go.work
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
go 1.19
go 1.20

use (
.
Expand Down
4 changes: 2 additions & 2 deletions internal/e2e/go.mod
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
module github.com/wasilibs/go-re2/e2e

go 1.19
go 1.20

require github.com/wasilibs/go-re2 v1.5.2

require (
github.com/magefile/mage v1.14.0 // indirect
github.com/tetratelabs/wazero v1.7.0 // indirect
github.com/tetratelabs/wazero v1.7.1 // indirect
)

replace github.com/wasilibs/go-re2 => ../..
3 changes: 1 addition & 2 deletions internal/e2e/go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
github.com/magefile/mage v1.14.0 h1:6QDX3g6z1YvJ4olPhT1wksUcSa/V0a1B+pJb73fBjyo=
github.com/magefile/mage v1.14.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A=
github.com/tetratelabs/wazero v1.7.0 h1:jg5qPydno59wqjpGrHph81lbtHzTrWzwwtD4cD88+hQ=
github.com/tetratelabs/wazero v1.7.0/go.mod h1:ytl6Zuh20R/eROuyDaGPkp82O9C/DJfXAwJfQ3X6/7Y=
github.com/tetratelabs/wazero v1.7.1 h1:QtSfd6KLc41DIMpDYlJdoMc6k7QTN246DM2+n2Y/Dx8=
github.com/wasilibs/nottinygc v0.4.0 h1:h1TJMihMC4neN6Zq+WKpLxgd9xCFMw7O9ETLwY2exJQ=
2 changes: 1 addition & 1 deletion magefiles/go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module github.com/wasilibs/go-re2/magefiles

go 1.18
go 1.20

require github.com/magefile/mage v1.14.0
17 changes: 9 additions & 8 deletions magefiles/magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,15 @@ func Test() error {
return err
}

// Could invoke wazero directly but the CLI has a simpler entry point.
// TODO: Enable this after it runs with wazero, it currently has been verified locally with wasmtime.
// if err := sh.RunWithV(map[string]string{"GOOS": "wasip1", "GOARCH": "wasm"}, "go", "build", "-o", filepath.Join("build", "test.wasm"), "./internal/e2e"); err != nil {
// return err
// }
// if err := sh.RunV("go", "run", "github.com/tetratelabs/wazero/cmd/wazero@v1.7.0", "run", filepath.Join("build", "test.wasm")); err != nil {
// return err
// }
if mode == "" {
if err := sh.RunWithV(map[string]string{"GOOS": "wasip1", "GOARCH": "wasm"}, "go", "build", "-o", filepath.Join("build", "test.wasm"), "./internal/e2e"); err != nil {
return err
}
// Could invoke wazero directly but the CLI has a simpler entry point.
if err := sh.RunV("go", "run", "github.com/tetratelabs/wazero/cmd/wazero@v1.7.1", "run", filepath.Join("build", "test.wasm")); err != nil {
return err
}
}

return nil
}
Expand Down
4 changes: 2 additions & 2 deletions wafbench/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/wasilibs/go-re2/wafbench

go 1.19
go 1.20

require (
github.com/bmatcuk/doublestar/v4 v4.4.0
Expand Down Expand Up @@ -31,7 +31,7 @@ require (
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/petar-dambovaliev/aho-corasick v0.0.0-20211021192214-5ab2d9280aa9 // indirect
github.com/tetratelabs/wazero v1.7.0 // indirect
github.com/tetratelabs/wazero v1.7.1 // indirect
github.com/tidwall/gjson v1.14.3 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.1 // indirect
Expand Down
2 changes: 1 addition & 1 deletion wafbench/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/tetratelabs/wazero v1.7.0 h1:jg5qPydno59wqjpGrHph81lbtHzTrWzwwtD4cD88+hQ=
github.com/tetratelabs/wazero v1.7.1 h1:QtSfd6KLc41DIMpDYlJdoMc6k7QTN246DM2+n2Y/Dx8=
github.com/tidwall/gjson v1.14.3 h1:9jvXn7olKEHU1S9vwoMGliaT8jq1vJ7IH/n9zD9Dnlw=
github.com/tidwall/gjson v1.14.3/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA=
Expand Down
Loading