aboutsummaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorJohan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>2024-04-07 09:27:11 -0700
committerJohan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>2024-04-11 17:09:10 +0000
commit890179d949da55aaa09d60c4fe2c25397d2ce906 (patch)
treeabc4e7b43bec3f54beffa12ac0b9a3658d246e25 /misc
parent08af216c75a583a198c4ccfe68628c74554ee82f (diff)
downloadgo-890179d949da55aaa09d60c4fe2c25397d2ce906.tar.gz
go-890179d949da55aaa09d60c4fe2c25397d2ce906.zip
misc/wasm: drop wasmtime < 14 support
For Go 1.23, we decided to no longer support the old CLI interface exposed by wasmtime. This removes the extra logic included to support both the new and the old CLI interface. Now only versions of wasmtime 14 and newer are supported. Fixes #63718 Change-Id: Iea31388dc41bc8d73caa923c7e4acae2228bf515 Reviewed-on: https://go-review.googlesource.com/c/go/+/577135 Reviewed-by: Randy Reddig <randy.reddig@fastly.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Carlos Amedee <carlos@golang.org>
Diffstat (limited to 'misc')
-rwxr-xr-xmisc/wasm/go_wasip1_wasm_exec10
1 files changed, 1 insertions, 9 deletions
diff --git a/misc/wasm/go_wasip1_wasm_exec b/misc/wasm/go_wasip1_wasm_exec
index cd16b96ea7..3b2d12ec45 100755
--- a/misc/wasm/go_wasip1_wasm_exec
+++ b/misc/wasm/go_wasip1_wasm_exec
@@ -14,15 +14,7 @@ case "$GOWASIRUNTIME" in
exec wazero run -mount /:/ -env-inherit -cachedir "${TMPDIR:-/tmp}"/wazero ${GOWASIRUNTIMEARGS:-} "$1" "${@:2}"
;;
"wasmtime" | "")
- # Match the major version in "wasmtime-cli 14.0.0". For versions before 14
- # we need to use the old CLI. This requires Bash v3.0 and above.
- # TODO(johanbrandhorst): Remove this condition once 1.22 is released.
- # From 1.23 onwards we'll only support the new wasmtime CLI.
- if [[ "$(wasmtime --version)" =~ wasmtime-cli[[:space:]]([0-9]+)\.[0-9]+\.[0-9]+ && "${BASH_REMATCH[1]}" -lt 14 ]]; then
- exec wasmtime run --dir=/ --env PWD="$PWD" --env PATH="$PATH" --max-wasm-stack 1048576 ${GOWASIRUNTIMEARGS:-} "$1" -- "${@:2}"
- else
- exec wasmtime run --dir=/ --env PWD="$PWD" --env PATH="$PATH" -W max-wasm-stack=1048576 ${GOWASIRUNTIMEARGS:-} "$1" "${@:2}"
- fi
+ exec wasmtime run --dir=/ --env PWD="$PWD" --env PATH="$PATH" -W max-wasm-stack=1048576 ${GOWASIRUNTIMEARGS:-} "$1" "${@:2}"
;;
*)
echo "Unknown Go WASI runtime specified: $GOWASIRUNTIME"