From e61ba8e537ecc845ffdc0a33d7062106a983592b Mon Sep 17 00:00:00 2001 From: Johan Brandhorst-Satzkorn Date: Sat, 25 Mar 2023 08:48:03 -0700 Subject: [PATCH] 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 Co-authored-by: Achille Roussel Co-authored-by: Julien Fabre Co-authored-by: Evan Phoenix Change-Id: I789465ae4daf2b380f3c05a9365b8d449c6af56c Reviewed-on: https://go-review.googlesource.com/c/go/+/479620 Reviewed-by: Ian Lance Taylor Run-TryBot: Johan Brandhorst-Satzkorn TryBot-Result: Gopher Robot Reviewed-by: Cherry Mui --- misc/wasm/go_wasip1_wasm_exec | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100755 misc/wasm/go_wasip1_wasm_exec 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}" -- 2.48.1