Expand description
The three standard streams’ intrinsics for std/io. pub, not private,
for the same reason as fs and bytes: its own doc comment explains
the boundary it implements. Branch read-write-stdio’s Task 1 added this
module beside fs and bytes, reusing fs‘s per-task slot table rather
than owning a second one.
The three standard streams’ boundary.
Each intrinsic acquires the process-global stream, acts, and drops it inside
the one call – the same shape nova_rt_print/nova_rt_eprint have used
since phase 1. Nothing here holds an OS handle between calls, which is why
these three types need no lifetime management and File (increment 3c) will.
Payloads travel in the per-task slot table fs owns. No panic may cross a
generated poll boundary, so nothing here unwraps, expects, indexes a slice,
or formats fallibly.
§Two boundary decisions, recorded here as well as in the task report that
§made them
How a write’s byte count reaches Nova. The status word already carries
the IoErrorKind on failure, so it cannot also carry a count on success
without a sentinel this boundary does not have. It travels instead as a
Bytes payload in the existing [Slot::Buffer], not a new Slot variant
– see [stash_count]’s own doc comment for why, and for the encoding a
Nova wrapper must decode.
write, not write_all. nova_rt_io_stdout_write and
nova_rt_io_stderr_write each make one Write::write call and report
whatever count it returns, rather than looping until the whole buffer is
sent. See nova_rt_io_stdout_write’s own doc comment for why.
Functions§
- nova_
rt_ ⚠io_ stderr_ flush - Flush stderr. Mirrors
nova_rt_io_stdout_flushexactly, against the other stream. - nova_
rt_ ⚠io_ stderr_ write - Write
buf’s bytes to stderr. Mirrorsnova_rt_io_stdout_writeexactly, against the other stream. - nova_
rt_ ⚠io_ stdin_ read - Read up to
maxbytes from stdin. An empty payload means end of stream. - nova_
rt_ ⚠io_ stdout_ flush - Flush stdout.
- nova_
rt_ ⚠io_ stdout_ write - Write
buf’s bytes to stdout. See [write_and_stash] for why this is onewritecall rather than awrite_allloop, and [stash_count] for how the reported count crosses back into Nova.