joshuawarner32 opened PR #2246 from preopened_handle
to main
:
<!--
Please ensure that the following steps are all taken care of before submitting
the PR.
[ ] This has been discussed in issue #..., or if not, please tell us why
here.[ ] A short description of what this does, why it is needed; if the
description becomes long, the matter should probably be discussed in an issue
first.[ ] This PR contains test cases, if meaningful.
- [ ] A reviewer from the core maintainer team has been assigned for this PR.
If you don't know who could review this, please indicate so. The list of
suggested reviewers on the right can help you.Please ensure all communication adheres to the code of conduct.
-->
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)
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)
sunfishcode submitted PR Review.
sunfishcode submitted PR Review.
sunfishcode created PR Review Comment:
Would it be possible to reimplement
preopened_dir
in terms of this function?
joshuawarner32 created PR Review Comment:
That would require making the
OsDir::try_from(dir)
part happen directly inpreopened_dir
, rather than in the callback - which in turn requires either modifying the interface to return Result, or panicking (boo!), or makingself.preopens
be a collection ofResult<PendingPreopen, ...>
(which would be... weird).Of those, I'd rather modify the interface to return result. Reporting errors earlier is generally better.
joshuawarner32 submitted PR Review.
joshuawarner32 submitted PR Review.
joshuawarner32 created PR Review Comment:
(That said, this feels like a distinct effort from just adding this one method)
sunfishcode submitted PR Review.
sunfishcode created PR Review Comment:
Makes sense; thanks for looking into it!
alexcrichton closed without merge PR #2246.
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