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: final edits to v1 spec #16

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
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
33 changes: 0 additions & 33 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,38 +10,6 @@ env:
CGO_ENABLED: 0

jobs:
watm_tinygo_v0_artifacts:
name: "watm: build ${{ matrix.watm.name }}.v0.tinygo.wasm with TinyGo"
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
watm: [
{ name: "plain", scheduler: "none", gc: "conservative", tags: "purego" },
{ name: "reverse", scheduler: "none", gc: "conservative", tags: "purego" },
{ name: "utls", scheduler: "asyncify", gc: "conservative", tags: "purego" }
]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.22.x"
- uses: acifani/setup-tinygo@v2
with:
tinygo-version: '0.32.0'
- name: Build WATM Artifacts
run: tinygo build -o ../../../${{ matrix.watm.name }}.v0.tinygo.wasm
-target=wasi -no-debug -scheduler=${{ matrix.watm.scheduler }}
-gc=${{ matrix.watm.gc }} -tags=${{ matrix.watm.tags }}
./${{ matrix.watm.name }}/
working-directory: ./tinygo/v0/examples/
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.watm.name }}.v0.tinygo
path: ${{ matrix.watm.name }}.v0.tinygo.wasm
retention-days: 1

watm_tinygo_v1_artifacts:
name: "watm: build ${{ matrix.watm.name }}.v1.tinygo.wasm with TinyGo"
runs-on: ubuntu-latest
Expand Down Expand Up @@ -76,7 +44,6 @@ jobs:

release:
needs:
- watm_tinygo_v0_artifacts
- watm_tinygo_v1_artifacts
name: "Release WATM Examples for ${{ github.ref_name }}"
runs-on: ubuntu-latest
Expand Down
23 changes: 0 additions & 23 deletions .github/workflows/watm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,29 +37,6 @@ jobs:
go build -v ./...
go test -v ./...

watm_build_tinygo_v0_examples:
name: "build ${{ matrix.examples }}.v0.tinygo.wasm w/ tinygo ${{ matrix.tinygo }} (go${{ matrix.go }})"
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
tinygo: [ "0.32.0" ] # latest tinygo version ONLY (1)
go: [ "1.21.x", "1.22.x" ] # latest 2 stable versions of Go. TODO: bump to 1.22.x once tinygo support added.
examples: [ "plain", "reverse", "utls" ] # Add examples here per ones under tinygo/v0/examples
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- uses: acifani/setup-tinygo@v2
with:
tinygo-version: ${{ matrix.tinygo }}
- name: Build
run: |
mkdir -p tmp
tinygo build -o tmp/${{ matrix.examples }}.wasm -target=wasi -tags=purego ./${{ matrix.examples }}/
working-directory: ./tinygo/v0/examples/

watm_build_tinygo_v1_examples:
name: "build ${{ matrix.examples }}.v1.tinygo.wasm w/ tinygo ${{ matrix.tinygo }} (go${{ matrix.go }})"
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions tinygo/snippets/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ module github.com/refraction-networking/watm/tinygo/snippets

go 1.20

replace github.com/tetratelabs/wazero v1.6.0 => github.com/refraction-networking/wazero v1.6.6-w
replace github.com/tetratelabs/wazero v1.7.3 => github.com/refraction-networking/wazero v1.7.3-w

require github.com/tetratelabs/wazero v1.6.0
require github.com/tetratelabs/wazero v1.7.3
4 changes: 2 additions & 2 deletions tinygo/snippets/go.sum
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github.com/refraction-networking/wazero v1.6.6-w h1:GopGAQ5/Rah0vzGImewwOrOaXFR+FmgWlgGKs1JpVlw=
github.com/refraction-networking/wazero v1.6.6-w/go.mod h1:ytl6Zuh20R/eROuyDaGPkp82O9C/DJfXAwJfQ3X6/7Y=
github.com/refraction-networking/wazero v1.7.3-w h1:Br3UuVPrKAD3pUSIlpT1+iBIYMbs8h2wS4d0ziU9Yoc=
github.com/refraction-networking/wazero v1.7.3-w/go.mod h1:ytl6Zuh20R/eROuyDaGPkp82O9C/DJfXAwJfQ3X6/7Y=
3 changes: 1 addition & 2 deletions tinygo/snippets/poll_oneoff/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ var pollWasm []byte

func main() {
ctx := context.Background()
ctx = context.WithValue(ctx, experimental.FunctionListenerFactoryKey{},
logging.NewHostLoggingListenerFactory(os.Stderr, logging.LogScopeFilesystem|logging.LogScopePoll|logging.LogScopeSock))
ctx = experimental.WithFunctionListenerFactory(ctx, logging.NewHostLoggingListenerFactory(os.Stderr, logging.LogScopeFilesystem|logging.LogScopePoll|logging.LogScopeSock))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wazero has (breakingly 😞) changed how they allow user to enable debug logging.


r := wazero.NewRuntime(ctx)
defer r.Close(ctx)
Expand Down
3 changes: 0 additions & 3 deletions tinygo/v0/README.md

This file was deleted.

52 changes: 0 additions & 52 deletions tinygo/v0/dialer.go

This file was deleted.

22 changes: 0 additions & 22 deletions tinygo/v0/examples/go.mod

This file was deleted.

14 changes: 0 additions & 14 deletions tinygo/v0/examples/go.sum

This file was deleted.

19 changes: 0 additions & 19 deletions tinygo/v0/examples/plain/README.md

This file was deleted.

12 changes: 0 additions & 12 deletions tinygo/v0/examples/plain/main.go

This file was deleted.

21 changes: 0 additions & 21 deletions tinygo/v0/examples/plain/wrapper_transport.go

This file was deleted.

19 changes: 0 additions & 19 deletions tinygo/v0/examples/reverse/README.md

This file was deleted.

11 changes: 0 additions & 11 deletions tinygo/v0/examples/reverse/main.go

This file was deleted.

23 changes: 0 additions & 23 deletions tinygo/v0/examples/utls/README.md

This file was deleted.

63 changes: 0 additions & 63 deletions tinygo/v0/examples/utls/lib/lib.go

This file was deleted.

Loading