From 374a58c1e10504750c1853791c473e87c6d58661 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Mon, 19 Dec 2022 10:27:08 +0100 Subject: [PATCH] Bun: explicitly print the output of the wasm module to the console --- test/default/wasi-test-wrapper.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/test/default/wasi-test-wrapper.sh b/test/default/wasi-test-wrapper.sh index be6abdd4..112f8824 100755 --- a/test/default/wasi-test-wrapper.sh +++ b/test/default/wasi-test-wrapper.sh @@ -44,6 +44,7 @@ if [ -z "$WASI_RUNTIME" ] || [ "$WASI_RUNTIME" = "bun" ]; then echo " const wasm = await WebAssembly.compile(fs.readFileSync('${1}'));" echo " await wasi.instantiate(wasm, {});" echo " wasi.start();" + echo " console.log(wasi.getStdoutString());" echo "})().catch(e => { console.error(e); process.exit(1); });" } >"${1}.mjs" bun run "${1}.mjs" 2>/tmp/err &&