Skip to content
This repository was archived by the owner on Apr 24, 2025. It is now read-only.

Commit 7fff3f6

Browse files
committed
use nightly TinyGo: WASI supported version
Signed-off-by: mathetake <[email protected]>
1 parent 1f21029 commit 7fff3f6

File tree

3 files changed

+18
-9
lines changed

3 files changed

+18
-9
lines changed

.github/workflows/workflow.yaml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,13 @@ jobs:
2626
name: build examples
2727
runs-on: ubuntu-latest
2828
container:
29-
image: tinygo/tinygo:0.15.0
29+
image: getenvoy/extension-tinygo-builder:latest
3030
steps:
3131
- name: checkout
3232
uses: actions/checkout@v2
3333

34-
- name: set up go 1.15
35-
uses: actions/setup-go@v1
36-
with:
37-
go-version: 1.15
38-
3934
- name: build examples
40-
run: find ./examples -type f -name "main.go" | xargs -Ip tinygo build -o p.wasm -target=wasm -wasm-abi=generic p
35+
run: make build.examples
4136

4237
- name: upload wasm-binaries
4338
uses: actions/upload-artifact@v2

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ build.example:
1010
tinygo build -o ./examples/${name}/main.go.wasm -target=wasm -wasm-abi=generic ./examples/${name}/main.go
1111

1212
build.examples:
13-
find ./examples -type f -name "main.go" | xargs -Ip tinygo build -o p.wasm -target=wasm -wasm-abi=generic p
13+
find ./examples -type f -name "main.go" | xargs -Ip tinygo build -o p.wasm -target=wasi -wasm-abi=generic p
1414

1515
lint:
1616
golangci-lint run --build-tags proxytest

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,21 @@ func (ctx *context) OnHttpRequestHeaders(int, bool) types.Action {
3838

3939
### requirements
4040

41-
- TinyGo(0.15.0+): https://tinygo.org
41+
proxy-wasm-go-sdk depends on the latest TinyGo which supports WASI target([tinygo-org/tinygo#1373](https://github.com/tinygo-org/tinygo/pull/1373)).
42+
In order to install that, simply run (Ubuntu/Debian):
43+
44+
```shell
45+
# this corresponds to https://github.com/tinygo-org/tinygo/commit/f50ad3585d084b17f7754f4b3cb0d42661fee036
46+
wget https://19227-136505169-gh.circle-artifacts.com/0/tmp/tinygo_amd64.deb
47+
dpkg -i tinygo_amd64.deb
48+
```
49+
50+
Alternatively, you can use the pre-built docker container `getenvoy/extention-tingyo-builder:wasi-dev` for any platform.
51+
52+
TinyGo's official release of WASI target will be soon, and after that you could
53+
just follow https://tinygo.org/getting-started/ to install the requirement. Stay tuned!
54+
55+
4256

4357
### compatible Envoy builds
4458

0 commit comments

Comments
 (0)