From: Johan Brandhorst-Satzkorn Date: Sat, 25 Mar 2023 15:48:03 +0000 (-0700) Subject: misc/wasm: add wasip1/wasm exec script X-Git-Tag: go1.21rc1~1011 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=e61ba8e537ecc845ffdc0a33d7062106a983592b;p=gostls13.git 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 --- 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}"