aboutsummaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorJohan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>2023-03-25 08:48:03 -0700
committerJohan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>2023-04-06 20:59:01 +0000
commite61ba8e537ecc845ffdc0a33d7062106a983592b (patch)
tree951e121c3c4b0cf27eb887d997545750ad9ad0f3 /misc
parent57b4df2188388d190fa4f5385f8052c008f9c7a5 (diff)
downloadgo-e61ba8e537ecc845ffdc0a33d7062106a983592b.tar.gz
go-e61ba8e537ecc845ffdc0a33d7062106a983592b.zip
misc/wasm: add wasip1/wasm exec script
This script uses Wazero, the open source, zero dependencies pure Go Wasm and WASI runtime. This is the runtime that allows the greatest number of standard library tests to pass. For #58141 Co-authored-by: Richard Musiol <neelance@gmail.com> Co-authored-by: Achille Roussel <achille.roussel@gmail.com> Co-authored-by: Julien Fabre <ju.pryz@gmail.com> Co-authored-by: Evan Phoenix <evan@phx.io> Change-Id: I789465ae4daf2b380f3c05a9365b8d449c6af56c Reviewed-on: https://go-review.googlesource.com/c/go/+/479620 Reviewed-by: Ian Lance Taylor <iant@google.com> Run-TryBot: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com>
Diffstat (limited to 'misc')
-rwxr-xr-xmisc/wasm/go_wasip1_wasm_exec6
1 files changed, 6 insertions, 0 deletions
diff --git a/misc/wasm/go_wasip1_wasm_exec b/misc/wasm/go_wasip1_wasm_exec
new file mode 100755
index 0000000000..37cba72368
--- /dev/null
+++ b/misc/wasm/go_wasip1_wasm_exec
@@ -0,0 +1,6 @@
+#!/usr/bin/env bash
+# Copyright 2023 The Go Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style
+# license that can be found in the LICENSE file.
+
+exec wazero run -mount /:/ -env-inherit -cachedir "${TMPDIR}"/wazero $1 "${@:2}"