Hacker News new | ask | show | jobs
by flohofwoe 879 days ago
Hopefully it's trivial to push C structs around by value if poking around in other instances memory isn't allowed. Otherwise it sounds like a lot of hassle just to appease "fringe languages" ( ;P ) that don't have a linear memory model. This sort of "directly reading and writing the WASM heap" is quite essential for JS code that sits between a WASM instance and a web API for instance (in the "WASM in browsers" scenario).

...for instance how do you share large amounts of data between components then, there must be some sort of cheap way to safely share portions of memory between components right? Because there are situations where multiple copy steps are simply out of question.

1 comments

If you watch the video I linked to in the sibling comment, Luke addresses that exact question around 21 minutes in. The WIT spec I also linked to talks about resources and handles in some depth.