-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restructure module stdio #520
Comments
There is a minor subtlety where a component can be writing to stdout/stderr as well as to a buffer for logging. We represent this as a Write implementation so it's not hard but it does need to be represented somehow. The way I envisaged this working was similar to you: it has to be driven from the outside in, with an opportunity for executor code to override. My original thought was that the host would actually compose what you call the In any case, I completely agree about simplifying and streamlining the whole area! |
We should pick up #514 as part of this. |
I'm also wondering if we can store the redirect as part of the component object. This puts it in a natural location as part of the component config, ETA: okay the component objects are in the execution context so we can still get at them |
@lann tells me he's working on a subset of this as part of a more general refactoring, FYI. |
This is pretty much subsumed by #763 |
There have been a few recent issues and PRs around the ways stdio is managed for WASI modules:
tracing
#449The current state of the code is somewhat confusing, requiring coordination between the configuration passed in
ExecutionContextConfiguration
and the trigger executor implementation. Also, the options for stdio handling are limited to capturing to memory, capturing to files, and afollow
flag that only works with the "capturing to memory" path.There a few interrelated requirements to detangle here:
I think we can restructure to simplify the code while maintaining these features:
Collapse the
ExecutionContextConfiguration
IO-related fields into a singleio
field typed like:Update
ExecutionContext::prepare_component
'sio
arg to take a type something like:Update existing
redirect_to_mem_buffer
usage to use WritePipe::new_in_memoryThe text was updated successfully, but these errors were encountered: