From ae03014632ce219931202df83a9b90ab59de497d Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Sun, 12 Feb 2023 22:38:02 -0500 Subject: [PATCH] web-wasi: mount /work in emulator for access to working directory Ensure there is access to the source tree for try_run's. --- imagefiles/wasmer-pwd.sh | 4 ++-- imagefiles/wasmtime-pwd.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/imagefiles/wasmer-pwd.sh b/imagefiles/wasmer-pwd.sh index e2baa28..f78971a 100755 --- a/imagefiles/wasmer-pwd.sh +++ b/imagefiles/wasmer-pwd.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash -# Mount the PWD to enable access in try_run commands -exec ${WASMER_DIR}/bin/wasmer run --dir=. --dir=$PWD "$@" +# Mount the PWD and the /work mount dir to enable access in try_run commands +exec ${WASMER_DIR}/bin/wasmer run --dir=. --dir=$PWD --dir=/work/ "$@" diff --git a/imagefiles/wasmtime-pwd.sh b/imagefiles/wasmtime-pwd.sh index 919a506..d6df605 100755 --- a/imagefiles/wasmtime-pwd.sh +++ b/imagefiles/wasmtime-pwd.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash -# Mount the PWD to enable access in try_run commands -exec ${WASMTIME_HOME}/bin/wasmtime run --dir=. --dir=$PWD "$@" +# Mount the PWD and the /work mount dir to enable access in try_run commands +exec ${WASMTIME_HOME}/bin/wasmtime run --dir=. --dir=$PWD --dir=/work/ "$@"