aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>2023-07-25 15:54:16 -0700
committerGopher Robot <gobot@golang.org>2023-07-31 18:16:13 +0000
commit9b53b9b585023aa8a38f87832de8d96e7278f121 (patch)
tree6960736cb85dfa75dd8f7d72b696e23d88737862
parent4a14d9c9af995061723487d3a9f749246863078b (diff)
downloadgo-9b53b9b585023aa8a38f87832de8d96e7278f121.tar.gz
go-9b53b9b585023aa8a38f87832de8d96e7278f121.zip
[release-branch.go1.21] misc/wasm: switch default WASI runtime
The default WASI runtime was originally set to Wazero, because it was the first runtime used to test the Go implementation and because we could easily find and fix issues in our implementation and theirs. In CL 498675 we switched the default wasip1 runner to Wasmtime as it runs faster and is a more established and mature runtime. We should switch the default runtime to Wasmtime to consistently promote Wasmtime as the primary tested and approved runtime. Change-Id: Ic6c064142321af90f015e02b7fe0e71444d8842c Reviewed-on: https://go-review.googlesource.com/c/go/+/513235 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Eli Bendersky <eliben@google.com> Run-TryBot: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com> Auto-Submit: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> (cherry picked from commit 4918490962ebda2b055bd1d160af9e9daa529522) Reviewed-on: https://go-review.googlesource.com/c/go/+/514155 Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: David Chase <drchase@google.com>
-rwxr-xr-xmisc/wasm/go_wasip1_wasm_exec8
1 files changed, 4 insertions, 4 deletions
diff --git a/misc/wasm/go_wasip1_wasm_exec b/misc/wasm/go_wasip1_wasm_exec
index 97bacfbff1..0351994364 100755
--- a/misc/wasm/go_wasip1_wasm_exec
+++ b/misc/wasm/go_wasip1_wasm_exec
@@ -10,12 +10,12 @@ case "$GOWASIRUNTIME" in
"wasmer")
exec wasmer run --dir=/ --env PWD="$PWD" --env PATH="$PATH" ${GOWASIRUNTIMEARGS:-} "$1" -- "${@:2}"
;;
- "wasmtime")
- exec wasmtime run --dir=/ --env PWD="$PWD" --env PATH="$PATH" --max-wasm-stack 1048576 ${GOWASIRUNTIMEARGS:-} "$1" -- "${@:2}"
- ;;
- "wazero" | "")
+ "wazero")
exec wazero run -mount /:/ -env-inherit -cachedir "${TMPDIR:-/tmp}"/wazero ${GOWASIRUNTIMEARGS:-} "$1" "${@:2}"
;;
+ "wasmtime" | "")
+ exec wasmtime run --dir=/ --env PWD="$PWD" --env PATH="$PATH" --max-wasm-stack 1048576 ${GOWASIRUNTIMEARGS:-} "$1" -- "${@:2}"
+ ;;
*)
echo "Unknown Go WASI runtime specified: $GOWASIRUNTIME"
exit 1