sunfishcode submitted PR Review.
sunfishcode updated PR #701 from virtfs
to master
:
This PR adds support for virtual files (so, file-like objects not necessarily backed by bytes on a local disk) for most WASI APIs. It also includes an implementation of virtual files (
InMemoryFile
) and directories (VirtualDir
). Functionally this is transparent to users of wasi-common.The intent here is to support operations on entities that are logically files, even if they may not be what the host OS calls "a file". These might be entirely artificial (like
/dev/random
, though__wasi_random_get()
already exists), static data acquired over the network at open rather than at read, or some other file-like semantic that shouldn't be obligated to go through a filesystem.For tests that have preopened directories, this duplicates the tests for
VirtualDir
/InMemoryFile
-backed testing. Actual test runner changes are pretty small as well: https://github.com/bytecodealliance/wasmtime/pull/701/files#diff-6bb07f6d2e62ac9c41406cd4d888db1aR29-R41. Additionally, I have a small branch againstlucet
, https://github.com/bytecodealliance/lucet/pull/375, to see this in action on our test programs there.(edit: updated description to reflect that this is no longer a draft PR)
kubkon submitted PR Review.
kubkon created PR Review Comment:
Cool! I guess we can refactor this in a subsequent PR :-)
kubkon submitted PR Review.
kubkon submitted PR Review.
kubkon created PR Review Comment:
pub(crate) fn path_create_directory(base: &File, path: &str) -> Result<()> {Looks like an explicit lifetime is not needed here after all.
iximeow updated PR #701 from virtfs
to master
:
This PR adds support for virtual files (so, file-like objects not necessarily backed by bytes on a local disk) for most WASI APIs. It also includes an implementation of virtual files (
InMemoryFile
) and directories (VirtualDir
). Functionally this is transparent to users of wasi-common.The intent here is to support operations on entities that are logically files, even if they may not be what the host OS calls "a file". These might be entirely artificial (like
/dev/random
, though__wasi_random_get()
already exists), static data acquired over the network at open rather than at read, or some other file-like semantic that shouldn't be obligated to go through a filesystem.For tests that have preopened directories, this duplicates the tests for
VirtualDir
/InMemoryFile
-backed testing. Actual test runner changes are pretty small as well: https://github.com/bytecodealliance/wasmtime/pull/701/files#diff-6bb07f6d2e62ac9c41406cd4d888db1aR29-R41. Additionally, I have a small branch againstlucet
, https://github.com/bytecodealliance/lucet/pull/375, to see this in action on our test programs there.(edit: updated description to reflect that this is no longer a draft PR)
iximeow merged PR #701.
Last updated: Nov 22 2024 at 16:03 UTC