Stream: git-wasmtime

Topic: wasmtime / PR #2246 Add WasiCtxBuilder::preopened_handle ...


view this post on Zulip Wasmtime GitHub notifications bot (Sep 30 2020 at 04:06):

joshuawarner32 opened PR #2246 from preopened_handle to main:

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Sep 30 2020 at 04:07):

joshuawarner32 edited PR #2246 from preopened_handle to main:

This will allow third-party libraries to implement their own VFS to expose to a wasi binary,
such as (for example) VFS implemenations that record all reads/writes done from wasi,
or purely user-space implementations of traditional filesystems.

Also modify the wasi-fs example to use this simplified & more powerful system.

(partial fix for #2232)

view this post on Zulip Wasmtime GitHub notifications bot (Sep 30 2020 at 04:08):

joshuawarner32 updated PR #2246 from preopened_handle to main:

This will allow third-party libraries to implement their own VFS to expose to a wasi binary,
such as (for example) VFS implemenations that record all reads/writes done from wasi,
or purely user-space implementations of traditional filesystems.

Also modify the wasi-fs example to use this simplified & more powerful system.

(partial fix for #2232)

view this post on Zulip Wasmtime GitHub notifications bot (Sep 30 2020 at 13:50):

sunfishcode submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 30 2020 at 13:50):

sunfishcode submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 30 2020 at 13:50):

sunfishcode created PR Review Comment:

Would it be possible to reimplement preopened_dir in terms of this function?

view this post on Zulip Wasmtime GitHub notifications bot (Sep 30 2020 at 20:31):

joshuawarner32 created PR Review Comment:

That would require making the OsDir::try_from(dir) part happen directly in preopened_dir, rather than in the callback - which in turn requires either modifying the interface to return Result, or panicking (boo!), or making self.preopens be a collection of Result<PendingPreopen, ...> (which would be... weird).

Of those, I'd rather modify the interface to return result. Reporting errors earlier is generally better.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 30 2020 at 20:31):

joshuawarner32 submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 30 2020 at 20:46):

joshuawarner32 submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 30 2020 at 20:46):

joshuawarner32 created PR Review Comment:

(That said, this feels like a distinct effort from just adding this one method)

view this post on Zulip Wasmtime GitHub notifications bot (Oct 07 2020 at 22:48):

sunfishcode submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 07 2020 at 22:48):

sunfishcode created PR Review Comment:

Makes sense; thanks for looking into it!

view this post on Zulip Wasmtime GitHub notifications bot (Mar 13 2024 at 02:19):

alexcrichton closed without merge PR #2246.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 13 2024 at 02:19):

alexcrichton commented on PR #2246:

I'm going to close this as this is quite an old PR at this point and I believe the previous summary is still applicable.


Last updated: Dec 23 2024 at 13:07 UTC