diff --git a/Makefile b/Makefile index 47990b4d81..1a53b529b6 100644 --- a/Makefile +++ b/Makefile @@ -52,12 +52,13 @@ build.examples.as: build.examples.zig: examples/allocation/zig/testdata/greet.wasm imports/wasi_snapshot_preview1/example/testdata/zig/cat.wasm imports/wasi_snapshot_preview1/testdata/zig/wasi.wasm @cd internal/testing/dwarftestdata/testdata/zig; zig build; mv zig-out/*/main.wasm ./ # Need DWARF custom sections. -tinygo_sources := examples/basic/testdata/add.go examples/allocation/tinygo/testdata/greet.go examples/cli/testdata/cli.go imports/wasi_snapshot_preview1/example/testdata/tinygo/cat.go imports/wasi_snapshot_preview1/testdata/tinygo/wasi.go +tinygo_sources := examples/basic/testdata/add.go examples/allocation/tinygo/testdata/greet.go examples/cli/testdata/cli.go imports/wasi_snapshot_preview1/example/testdata/tinygo/cat.go imports/wasi_snapshot_preview1/testdata/tinygo/wasi.go cmd/wazero/testdata/cat/cat.go .PHONY: build.examples.tinygo build.examples.tinygo: $(tinygo_sources) @for f in $^; do \ tinygo build -o $$(echo $$f | sed -e 's/\.go/\.wasm/') -scheduler=none --no-debug --target=wasi $$f; \ done + @mv cmd/wazero/testdata/cat/cat.wasm cmd/wazero/testdata/cat/cat-tinygo.wasm # We use zig to build C as it is easy to install and embeds a copy of zig-cc. # Note: Don't use "-Oz" as that breaks our wasi sock example. diff --git a/cmd/wazero/testdata/cat/cat-tinygo.wasm b/cmd/wazero/testdata/cat/cat-tinygo.wasm index 8a6114f8ac..6a0b004cfc 100755 Binary files a/cmd/wazero/testdata/cat/cat-tinygo.wasm and b/cmd/wazero/testdata/cat/cat-tinygo.wasm differ diff --git a/cmd/wazero/wazero_test.go b/cmd/wazero/wazero_test.go index e311249c00..54f6397453 100644 --- a/cmd/wazero/wazero_test.go +++ b/cmd/wazero/wazero_test.go @@ -337,9 +337,9 @@ func TestRun(t *testing.T) { <== (opened_fd=4,errno=ESUCCESS) ==> wasi_snapshot_preview1.fd_filestat_get(fd=4) <== (filestat={filetype=REGULAR_FILE,size=5,mtim=%d},errno=ESUCCESS) -==> wasi_snapshot_preview1.fd_read(fd=4,iovs=64776,iovs_len=1) +==> wasi_snapshot_preview1.fd_read(fd=4,iovs=64744,iovs_len=1) <== (nread=5,errno=ESUCCESS) -==> wasi_snapshot_preview1.fd_read(fd=4,iovs=64776,iovs_len=1) +==> wasi_snapshot_preview1.fd_read(fd=4,iovs=64744,iovs_len=1) <== (nread=0,errno=ESUCCESS) ==> wasi_snapshot_preview1.fd_close(fd=4) <== errno=ESUCCESS diff --git a/examples/allocation/tinygo/testdata/greet.wasm b/examples/allocation/tinygo/testdata/greet.wasm index 4ee17d9c3b..7e02264f7d 100755 Binary files a/examples/allocation/tinygo/testdata/greet.wasm and b/examples/allocation/tinygo/testdata/greet.wasm differ diff --git a/examples/basic/testdata/add.wasm b/examples/basic/testdata/add.wasm index 259ca4f00a..42649cfc58 100755 Binary files a/examples/basic/testdata/add.wasm and b/examples/basic/testdata/add.wasm differ diff --git a/examples/cli/testdata/cli.wasm b/examples/cli/testdata/cli.wasm index d12a81a38d..a40ec68c89 100755 Binary files a/examples/cli/testdata/cli.wasm and b/examples/cli/testdata/cli.wasm differ diff --git a/imports/wasi_snapshot_preview1/example/testdata/tinygo/cat.wasm b/imports/wasi_snapshot_preview1/example/testdata/tinygo/cat.wasm index 3346d1dde4..6a0b004cfc 100755 Binary files a/imports/wasi_snapshot_preview1/example/testdata/tinygo/cat.wasm and b/imports/wasi_snapshot_preview1/example/testdata/tinygo/cat.wasm differ diff --git a/imports/wasi_snapshot_preview1/testdata/tinygo/wasi.wasm b/imports/wasi_snapshot_preview1/testdata/tinygo/wasi.wasm index d7dfb28d32..caaed618c1 100755 Binary files a/imports/wasi_snapshot_preview1/testdata/tinygo/wasi.wasm and b/imports/wasi_snapshot_preview1/testdata/tinygo/wasi.wasm differ diff --git a/internal/integration_test/bench/testdata/case.wasm b/internal/integration_test/bench/testdata/case.wasm index 1028ba630d..9092ace645 100755 Binary files a/internal/integration_test/bench/testdata/case.wasm and b/internal/integration_test/bench/testdata/case.wasm differ