Using file objects (or equivalent) for stdio streams
Now that https://github.com/bytecodealliance/wasmtime-py/pull/33 is here, I understand that it's only possible to open a file on the host filesystem as an stdio stream. But that's (IMO) rarely useful: most WASI programs probably can accept data via files on the command line just as well as via stdio.
What I'd like to do is to capture stdout/stderr of a WASI application. Sure, I can do this by running a new host subprocess (with some caveats) but it would be a lot nicer if wasmtime-py provided this capability directly.
This'll likely require significant implementation work on the C API side of things, but definitely possible to do. I think the underlying support was refactored to support arbitrary "handles" which we could bind as calling back to Python.
Sounds good!
This would be helpful in Perl as well. Is there a related issue for the C api in wasmtime?
I don't believe so, but one would be most welcome!