Stream: git-wasmtime

Topic: wasmtime / Issue #2202 wasi common: move fs and path into...


view this post on Zulip Wasmtime GitHub notifications bot (Sep 15 2020 at 01:25):

github-actions[bot] commented on Issue #2202:

Subscribe to Label Action

cc @kubkon

<details>
This issue or pull request has been labeled: "wasi"

Thus the following users have been cc'd because of the following labels:

To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.

Learn more.
</details>

view this post on Zulip Wasmtime GitHub notifications bot (Sep 16 2020 at 21:54):

pchickey commented on Issue #2202:

rebased on top of main after #2201 merged

view this post on Zulip Wasmtime GitHub notifications bot (Sep 16 2020 at 21:54):

pchickey edited a comment on Issue #2202:

This PR has been rebased on top of main after #2201 merged

view this post on Zulip Wasmtime GitHub notifications bot (Sep 23 2020 at 23:55):

pchickey commented on Issue #2202:

wrt the Rights flags: right now, the canonical definition of the rights type is in the witx snapshot, but if we evolve how rights work, I expect the first thing we'll do is make the canonical definition a type defined in wasi-common, and then define conversion functions for whenever we need to represent those to the guest via each snapshot we support.

wrt separation of responsibilities: first off, theres a big overlap between Handle and Entry right now, which needs design work still. I'm not 100% sure how to resolve these yet. My goal is that the handle/entry concept will be responsible for exporting all types used in its interfaces. Whether those types are imported from a given snapshot's wiggle generated code, or defined canonically without wiggle, is an implementation detail.

At the moment, snapshots manipulate the entry table (mostly get_entry but some remove_entry and insert_entry_at) and call Entry methods (though they do so with types exported by crate::handle... admittedly this is muddled). Since we want to define many snapshots that will usually look a lot alike, I tried to move as much complexity out of these bodies as possible, while exposing as few pointers (and, with them, assumptions about how guest programs represent things in memory) to the Entry methods as possible. Unfortunately, I haven't figured out how to do this with absolutely no pointers, unless we reintroduce mut vs const borrows to the wiggle api so that const borrows can overlap.

Then, each snapshot will be responsible for calling the handle/entry concept, converting any of its interfaces's types to and from the ones expected by the Entry methods. Whichever snapshot's types get exported by crate::handle gets to skip this converting to/from code. For all of the types in snapshot 0, we'll have to define conversion functions, but the overwhelming majority of them should compile to a no-op because the representation is exactly the same.

This PR leaves this work incomplete - #2205 is still a work in progress at completing that abstraction with the scheduler methods.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 02 2020 at 21:23):

pchickey commented on Issue #2202:

Closing, I'm taking another tack on this work based on cap-std & system-interface.


Last updated: Nov 22 2024 at 17:03 UTC