Nushell: Orientation
Nushell treats pipelines as transformations of structured values while still
interoperating with byte-oriented Unix processes. Its architectural center is
PipelineData: empty, one materialized Value, a lazy ListStream, or a
ByteStream that may own a child process.
source text → parse/type shape → block/calls
↓
EngineState + mutable Stack → Command::run(PipelineData) → PipelineData
↕
external child pipes / plugins / Rayon
Design thesis
Nushell keeps structured pipelines lazy and synchronous by default, then introduces threads, Rayon, and child processes only at boundaries whose ownership and ordering consequences users can see.
PipelineDatadistinguishes repeatable values from consumable streams.- Pull-based iterators provide natural pressure and early termination.
par-eachmakes parallelism and its ordering tradeoff explicit.ByteStreamkeeps child output and process completion in one lifecycle.
We preserve the value/stream distinction, lazy iterator pipelines, metadata and source spans, structured errors, cooperative signals, external-process bridges, bounded parallel mapping, explicit ordering policy, and cloneable command objects.