Skip to content

Commit 9b53b9b

Browse files
johanbrandhorstgopherbot
authored andcommitted
[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 <[email protected]> Reviewed-by: Eli Bendersky <[email protected]> Run-TryBot: Johan Brandhorst-Satzkorn <[email protected]> Auto-Submit: Johan Brandhorst-Satzkorn <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> (cherry picked from commit 4918490) Reviewed-on: https://go-review.googlesource.com/c/go/+/514155 Auto-Submit: Dmitri Shuralyov <[email protected]> Reviewed-by: David Chase <[email protected]>
1 parent 4a14d9c commit 9b53b9b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

misc/wasm/go_wasip1_wasm_exec

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ case "$GOWASIRUNTIME" in
1010
"wasmer")
1111
exec wasmer run --dir=/ --env PWD="$PWD" --env PATH="$PATH" ${GOWASIRUNTIMEARGS:-} "$1" -- "${@:2}"
1212
;;
13-
"wasmtime")
14-
exec wasmtime run --dir=/ --env PWD="$PWD" --env PATH="$PATH" --max-wasm-stack 1048576 ${GOWASIRUNTIMEARGS:-} "$1" -- "${@:2}"
15-
;;
16-
"wazero" | "")
13+
"wazero")
1714
exec wazero run -mount /:/ -env-inherit -cachedir "${TMPDIR:-/tmp}"/wazero ${GOWASIRUNTIMEARGS:-} "$1" "${@:2}"
1815
;;
16+
"wasmtime" | "")
17+
exec wasmtime run --dir=/ --env PWD="$PWD" --env PATH="$PATH" --max-wasm-stack 1048576 ${GOWASIRUNTIMEARGS:-} "$1" -- "${@:2}"
18+
;;
1919
*)
2020
echo "Unknown Go WASI runtime specified: $GOWASIRUNTIME"
2121
exit 1

0 commit comments

Comments
 (0)