Bun: explicitly print the output of the wasm module to the console
This commit is contained in:
parent
45da50ab0e
commit
374a58c1e1
@ -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 &&
|
||||
|
Loading…
Reference in New Issue
Block a user