Pipe ls to wc


The following pipe_ls_wc program demonstrates how to connect two child processes with a pipe in Rust, like the shell pipeline ls | wc -l. The stdout of ls is piped with Stdio::piped() and then handed to wc as its stdin.

This zip file contains the complete crate.

src/main.rs