acton icon indicating copy to clipboard operation
acton copied to clipboard

Place stdio functions in `env.stdio`

Open plajjan opened this issue 6 months ago • 2 comments

We should have a env.stdio to interact with stdio

actor _EnvStdio():
    def out(s: str):
        """Send text to stdout"""

    def err(s: str):
        """Send text to stderr"""

    def install(on_stdin: action(str) -> None):
        """Install stdin callback function"""

actor Env(..)
    stdio = _EnvStdio()

plajjan avatar Jul 03 '25 13:07 plajjan

I attempted this and realized that we currently don't run the Env init function - it is entirely constructed from C code, so adding that part

actor Env(...):
    stdio = _EnvStdio()

becomes a real headache.. we really want to be able to run this based on the generated code for the Env initialization. I created #2368 for this

plajjan avatar Jul 18 '25 11:07 plajjan

I think we need #2368 for this and since we haven't even designed how #2368 will work, that might take some time. Until further, deferring this till next year.

plajjan avatar Aug 08 '25 11:08 plajjan