From dcdcb7e7524dbdd65f0f1c608b7fbff0f4d1777c Mon Sep 17 00:00:00 2001 From: Takeshi Yoneda Date: Tue, 18 Jun 2024 13:02:44 -0700 Subject: [PATCH 1/5] ci: update TinyGo to 0.32 Signed-off-by: Takeshi Yoneda --- .github/workflows/push-wasm-images.yaml | 2 +- .github/workflows/workflow.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/push-wasm-images.yaml b/.github/workflows/push-wasm-images.yaml index c7e024c6..7cc0a778 100644 --- a/.github/workflows/push-wasm-images.yaml +++ b/.github/workflows/push-wasm-images.yaml @@ -4,7 +4,7 @@ on: branches: - main env: - TINYGO_VERSION: 0.31.2 + TINYGO_VERSION: 0.32.0 jobs: build-and-push-wasm-images: diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index aa770587..c4ebfea1 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -8,7 +8,7 @@ on: - main env: - TINYGO_VERSION: 0.31.2 + TINYGO_VERSION: 0.32.0 jobs: style: From d34f39427a723f6951916411bf165e306682efcd Mon Sep 17 00:00:00 2001 From: Takeshi Yoneda Date: Tue, 18 Jun 2024 13:13:21 -0700 Subject: [PATCH 2/5] ci: update TinyGo to 0.32 Signed-off-by: Takeshi Yoneda --- proxywasm/internal/hostcall_utils_go.go | 2 - proxywasm/internal/hostcall_utils_tinygo.go | 42 --------------------- 2 files changed, 44 deletions(-) delete mode 100644 proxywasm/internal/hostcall_utils_tinygo.go diff --git a/proxywasm/internal/hostcall_utils_go.go b/proxywasm/internal/hostcall_utils_go.go index 8d2c48a1..f9cd4d29 100644 --- a/proxywasm/internal/hostcall_utils_go.go +++ b/proxywasm/internal/hostcall_utils_go.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build !tinygo - // Since the difference of the types in SliceHeader.{Len, Cap} between tinygo and go, // we have to have separated functions for converting bytes // https://github.com/tinygo-org/tinygo/issues/1284 diff --git a/proxywasm/internal/hostcall_utils_tinygo.go b/proxywasm/internal/hostcall_utils_tinygo.go deleted file mode 100644 index b3b8fd96..00000000 --- a/proxywasm/internal/hostcall_utils_tinygo.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2020-2024 Tetrate -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//go:build tinygo - -// Since the difference of the types in SliceHeader.{Len, Cap} between tinygo and go, -// we have to have separated functions for converting bytes -// https://github.com/tinygo-org/tinygo/issues/1284 - -package internal - -import ( - "reflect" - "unsafe" -) - -func RawBytePtrToString(raw *byte, size int) string { - return *(*string)(unsafe.Pointer(&reflect.SliceHeader{ - Data: uintptr(unsafe.Pointer(raw)), - Len: uintptr(size), - Cap: uintptr(size), - })) -} - -func RawBytePtrToByteSlice(raw *byte, size int) []byte { - return *(*[]byte)(unsafe.Pointer(&reflect.SliceHeader{ - Data: uintptr(unsafe.Pointer(raw)), - Len: uintptr(size), - Cap: uintptr(size), - })) -} From eb926388e5f3359cb5b6f06ea2fd8ebbf6af3893 Mon Sep 17 00:00:00 2001 From: Takeshi Yoneda Date: Tue, 18 Jun 2024 13:21:48 -0700 Subject: [PATCH 3/5] doc Signed-off-by: Takeshi Yoneda --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1f75d5f5..e6d00e24 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ This SDK is powered by [TinyGo](https://tinygo.org/) and does not support the of ## Requirements -- [TinyGo](https://tinygo.org/) - This SDK depends on TinyGo and leverages its [WASI](https://github.com/WebAssembly/WASI) (WebAssembly System Interface) target. Please follow the official instruction [here](https://tinygo.org/getting-started/) for installing TinyGo. +- [TinyGo](https://tinygo.org/): v0.32+ - This SDK depends on TinyGo and leverages its [WASI](https://github.com/WebAssembly/WASI) (WebAssembly System Interface) target. Please follow the official instruction [here](https://tinygo.org/getting-started/) for installing TinyGo. - [Envoy](https://www.envoyproxy.io) - To run compiled examples, you need to have Envoy binary. We recommend using [func-e](https://func-e.io) as the easiest way to get started with Envoy. Alternatively, you can follow [the official instruction](https://www.envoyproxy.io/docs/envoy/latest/start/install). From b5f6398514f34c735dd5931beee0d36ce32b6568 Mon Sep 17 00:00:00 2001 From: Takeshi Yoneda Date: Tue, 18 Jun 2024 13:22:24 -0700 Subject: [PATCH 4/5] rename Signed-off-by: Takeshi Yoneda --- proxywasm/internal/{hostcall_utils_go.go => hostcall_utils.go} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename proxywasm/internal/{hostcall_utils_go.go => hostcall_utils.go} (100%) diff --git a/proxywasm/internal/hostcall_utils_go.go b/proxywasm/internal/hostcall_utils.go similarity index 100% rename from proxywasm/internal/hostcall_utils_go.go rename to proxywasm/internal/hostcall_utils.go From cc3032f51c8a951a67764ea51042bb0af8f38be3 Mon Sep 17 00:00:00 2001 From: Takeshi Yoneda Date: Tue, 18 Jun 2024 13:28:20 -0700 Subject: [PATCH 5/5] fix workflow Signed-off-by: Takeshi Yoneda --- .github/workflows/push-wasm-images.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push-wasm-images.yaml b/.github/workflows/push-wasm-images.yaml index 7cc0a778..0c02c1bc 100644 --- a/.github/workflows/push-wasm-images.yaml +++ b/.github/workflows/push-wasm-images.yaml @@ -32,7 +32,7 @@ jobs: with: registry: ghcr.io username: ${{ github.repository_owner }} - password: ${{ secrets.GHCR_TOKEN }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Build/Push Docker images run: make wasm_image.build_push