Open yagehu opened 7 months ago
The file system is sandboxed by default.
You need to mount host directories into the WASM context by using --mapdir <GUEST_PATH>:<HOST_PATH>
.
In your example: --mapdir tmptest:tmptest
.
Feel free to comment/reopen if you run into additional issues.
@theduke I'm aware. I am mounting a directory with --dir .
. I've raised a PR that fixes this. https://github.com/wasmerio/wasmer/pull/4363
I believe this is just an error with mapping .
whichthe PR fixes.
Describe the bug
This following simple C program compiled with wasi-sdk does not work with Wasmer.
Steps to reproduce
Compile with wasi-sdk and run with Wasmer.
Expected behavior
This snippet should create a file
a
in thetmptest
directory.Actual behavior
Additional context
It seems the parent directory is resolved to the virtual root in the
path_open
handler. I'll be able to submit a patch.