alexcrichton closed issue #2232:
I'm interested in using wasmtime as a VM to run wasi scripts in a sandbox - and by being at the level normally reserved for the OS, being able to get precise information about which files/dirs the sandboxed application reads and writes. I'd also like to be able to dynamically fill in the filesystem tree exposed to the wasi program rather than having to have the tree pre-populated, as in my case the filesystem tree could be prohibitively large.
There are a couple things missing from the existing
VirtualDirEntry:
- Listing a directory dynamically - e.g. by changing the
Directoryenum from storingHashMap<String, VirtualDirEntry>to storingBox<dyn DirContents>, analogous to FileContents- Receiving callbacks for when new files are created in a given dir, presumably via the new
trait DirContentsThis design is of course pretty fuzzy at this point, and I've only done a cursory inspection of the interfaces involved. I'd be interested in working on this, if this seems to be in alignment with the project's goals. Feedback is most welcome!
alexcrichton commented on issue #2232:
A fair bit of time has passed since this was opened but nowadays we've explicitly decided to not support a full-blown VFS in
wasmtime-wasi. It's always possible for guests nowadays to implement thebindgen!-generated traits themselves, however, which would enable intercepting all operations.
Last updated: Jul 29 2026 at 05:03 UTC