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

deps(build): bump wasmtime-go: v3 -> v17 #6556

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -65,7 +65,7 @@ TELEMETRY_URL ?= #Default empty

BUILD_HOSTNAME := $(shell ./build/get-build-hostname.sh)

RELEASE_BUILD_IMAGE := golang:$(GOVERSION)-bullseye
RELEASE_BUILD_IMAGE := golang:$(GOVERSION)-bookworm

RELEASE_DIR ?= _release/$(VERSION)

Expand Down
3 changes: 2 additions & 1 deletion build/ensure-windows-toolchain.sh
Expand Up @@ -7,4 +7,5 @@ PKG=gcc-mingw-w64-x86-64
type -f ${CC} 2>/dev/null && exit 0

apt-get update && \
apt-get install --no-install-recommends -y ${PKG}
apt-get install --no-install-recommends -y ${PKG} && \
apt-get install --no-install-recommends -y binutils-mingw-w64-x86-64
2 changes: 1 addition & 1 deletion go.mod
Expand Up @@ -6,7 +6,7 @@ require (
github.com/OneOfOne/xxhash v1.2.8
github.com/agnivade/levenshtein v1.1.1
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883
github.com/bytecodealliance/wasmtime-go/v3 v3.0.2
github.com/bytecodealliance/wasmtime-go/v17 v17.0.0
github.com/containerd/containerd v1.7.12
github.com/dgraph-io/badger/v3 v3.2103.5
github.com/fortytw2/leaktest v1.3.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Expand Up @@ -17,8 +17,8 @@ github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdK
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/bytecodealliance/wasmtime-go/v3 v3.0.2 h1:3uZCA/BLTIu+DqCfguByNMJa2HVHpXvjfy0Dy7g6fuA=
github.com/bytecodealliance/wasmtime-go/v3 v3.0.2/go.mod h1:RnUjnIXxEJcL6BgCvNyzCCRzZcxCgsZCi+RNlvYor5Q=
github.com/bytecodealliance/wasmtime-go/v17 v17.0.0 h1:Cqs/IPBXQZW/rXKGJEn9aUTbjSiEugHPCdl6bz05Bf0=
github.com/bytecodealliance/wasmtime-go/v17 v17.0.0/go.mod h1:Xc5PsJLgMNsHdxFh4wwEdxTYe/AmwlkhPgmemK7FuNs=
github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM=
github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
Expand Down
2 changes: 1 addition & 1 deletion internal/wasm/sdk/internal/wasm/bindings.go
Expand Up @@ -16,7 +16,7 @@ import (
"strconv"
"time"

wasmtime "github.com/bytecodealliance/wasmtime-go/v3"
wasmtime "github.com/bytecodealliance/wasmtime-go/v17"

"github.com/open-policy-agent/opa/ast"
"github.com/open-policy-agent/opa/metrics"
Expand Down
2 changes: 1 addition & 1 deletion internal/wasm/sdk/internal/wasm/pool.go
Expand Up @@ -9,7 +9,7 @@ import (
"context"
"sync"

wasmtime "github.com/bytecodealliance/wasmtime-go/v3"
wasmtime "github.com/bytecodealliance/wasmtime-go/v17"

"github.com/open-policy-agent/opa/internal/wasm/sdk/opa/errors"
"github.com/open-policy-agent/opa/internal/wasm/util"
Expand Down
6 changes: 3 additions & 3 deletions internal/wasm/sdk/internal/wasm/vm.go
Expand Up @@ -14,7 +14,7 @@ import (
"strings"
"time"

wasmtime "github.com/bytecodealliance/wasmtime-go/v3"
wasmtime "github.com/bytecodealliance/wasmtime-go/v17"

"github.com/open-policy-agent/opa/ast"
sdk_errors "github.com/open-policy-agent/opa/internal/wasm/sdk/opa/errors"
Expand Down Expand Up @@ -94,11 +94,11 @@ func newVM(opts vmOpts, engine *wasmtime.Engine) (*VM, error) {
v.dispatcher = newBuiltinDispatcher()
externs := opaFunctions(v.dispatcher, store)
for name, extern := range externs {
if err := linker.Define("env", name, extern); err != nil {
if err := linker.Define(store, "env", name, extern); err != nil {
return nil, fmt.Errorf("linker: env.%s: %w", name, err)
}
}
if err := linker.Define("env", "memory", memory); err != nil {
if err := linker.Define(store, "env", "memory", memory); err != nil {
return nil, fmt.Errorf("linker: env.memory: %w", err)
}

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.