-
Notifications
You must be signed in to change notification settings - Fork 135
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
Callback streams for use as library #2799
base: master
Are you sure you want to change the base?
Conversation
40f13b0
to
63f381e
Compare
Rather than having one value in Also (unrelated to this PR) having |
a1870db
to
312d1ed
Compare
I guess it also makes sense to make |
👀 what's the high level of this? configurable input/output/error streams? If so, I'm all for it! If not... probably still all for it, just not sure what I'm all for yet! |
Yes, this lets you handle stdin, stdout and stderr programatically, instead of it leaking to the real stdin, stdout or stderr. |
I assume this does not apply to shell/N? different PR, probably? |
Yeah, |
I removed the way to make input null streams too. Now the default is an empty memory buffer. I also made some more tests, and in the process added support for converting streams to Something funny I noticed is that |
This adds a new
StreamConfig
option that allows both to asynchronously react to theMachine
writing to stdout or stderr, and to programatically send data to its stdin, all in-memory.This is an incredible feature for many reasons, like being able to get stdout in parts and not just all at once, but the application I have in mind is running the same toplevel we use for CLI inside Wasm in the Scryer Playground, which will be a great improvement in usability!