Stream: git-wasmtime

Topic: wasmtime / PR #701 Virtual file support


view this post on Zulip Wasmtime GitHub notifications bot (Mar 06 2020 at 00:47):

sunfishcode submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 06 2020 at 00:52):

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 against lucet, 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)

view this post on Zulip Wasmtime GitHub notifications bot (Mar 06 2020 at 14:12):

kubkon submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 06 2020 at 14:12):

kubkon created PR Review Comment:

Cool! I guess we can refactor this in a subsequent PR :-)

view this post on Zulip Wasmtime GitHub notifications bot (Mar 06 2020 at 14:15):

kubkon submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 06 2020 at 14:15):

kubkon submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 06 2020 at 14:15):

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.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 06 2020 at 17:46):

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 against lucet, 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)

view this post on Zulip Wasmtime GitHub notifications bot (Mar 06 2020 at 19:08):

iximeow merged PR #701.


Last updated: Dec 23 2024 at 12:05 UTC