Bun requires an absolute path
This commit is contained in:
parent
c3c2595bd7
commit
45da50ab0e
@ -39,7 +39,7 @@ if [ -z "$WASI_RUNTIME" ] || [ "$WASI_RUNTIME" = "bun" ]; then
|
||||
{
|
||||
echo "import fs from 'fs'; import { init, WASI } from '@wasmer/wasi';"
|
||||
echo "await init();"
|
||||
echo "const wasi = new WASI({args: process.argv, env: process.env, preopens: {'.':'.'}});"
|
||||
echo "const wasi = new WASI({args: process.argv, env: process.env, preopens: {'.':'/'}});"
|
||||
echo "await (async function() {"
|
||||
echo " const wasm = await WebAssembly.compile(fs.readFileSync('${1}'));"
|
||||
echo " await wasi.instantiate(wasm, {});"
|
||||
|
Loading…
Reference in New Issue
Block a user