Make Your Rust CLI Pipe-Friendly: stdin, stdout and Broken Pipes
Read from a file or from stdin, write efficiently, and exit quietly when someone runs your tool through head.
blog
Short, practical write-ups from building command-line tools and backend systems in Rust.
Read from a file or from stdin, write efficiently, and exit quietly when someone runs your tool through head.
Learn how to call C and assembly from Rust using build.rs, the cc crate, bindgen, and inline asm. Practical examples, safe wrappers, and fixes.
Use anyhow's Context to turn cryptic failures like 'No such file or directory' into messages your users can actually act on.
Turn a plain struct into a full argument parser, complete with flags, options, help text and --version, in about a dozen lines.
Looking for more? I also write at Fresh Tech Tips (opens in a new tab). Subscribe to this blog via RSS.