]> Cypherpunks.ru repositories - gostls13.git/commitdiff
misc/wasm: add wasmer to wasip1 script
authorJohan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
Tue, 9 May 2023 05:21:19 +0000 (22:21 -0700)
committerJohan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
Tue, 9 May 2023 16:19:36 +0000 (16:19 +0000)
The wasmer runtime will be used to test our wasip1
implementation against the WASI runtime from wasmer.io.

For #59907

Change-Id: Ie7e48c39e03075815ddca46d996b6ec87009b12a
Reviewed-on: https://go-review.googlesource.com/c/go/+/493775
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
misc/wasm/go_wasip1_wasm_exec

index 3e1fc62156a2663fec717acb8d76bae1360dcf97..55917eae88f7febb869dcfa415b34cab4cee5056 100755 (executable)
@@ -4,6 +4,9 @@
 # license that can be found in the LICENSE file.
 
 case "$GOWASIRUNTIME" in
+       "wasmer")
+               exec wasmer run --dir=/ --env PWD="$PWD" "$1" -- "${@:2}"
+               ;;
        "wasmtime")
                exec wasmtime run --dir=/ --env PWD="$PWD" --max-wasm-stack 1048576 "$1" -- "${@:2}"
                ;;