Expand description
Generic input/output primitives.
The Engine provides the mechanisms for streams, pipes, and interactive screens; it does not assign them operating-system meaning. The Shell layer routes command stdin/stdout/stderr through these primitives, the OS commands consume and produce them, and the Terminal layer plugs its screen in as an output.
The Terminal interface is an Engine primitive for the same reason
Input and Output are: a rectangular screen, a cursor, and a key
stream are generic abstractions usable by editors, games, and any other
stateful application — not operating-system concepts. Concrete rendering
(ANSI parsing, screen buffers) lives above the Engine.
§Notes
Pipeis an in-memory, effectively unbounded channel. It exists to coordinate sequential virtual command execution (producer finishes, then consumer reads); it is not a host OS pipe and does not claim host concurrency semantics. The Shell runtime layer decides how commands are scheduled.- Streams are
Send + Syncso the Shell may move them between command invocations.
Structs§
- Bytes
Input - An input over a fixed byte buffer (for example a script body).
- Bytes
Output - An output that accumulates bytes in memory (used by tests and the non-interactive shell).
- Empty
Input - An input that is always at end of stream.
- KeyEvent
- A single structured key press.
- Pipe
- An in-memory pipe for virtual command coordination.
- Sink
Output - An output that discards everything (the virtual
/dev/null). - Size
- The dimensions of a screen, in rows and columns.
- String
Input - A line-oriented input over static text.
Enums§
- Input
Error - Errors produced by an
Inputstream. - Input
Mode - The input mode of a terminal.
- Key
- A keyboard key, independent of modifiers.
- Output
Error - Errors produced by an
Outputstream.