Yes-rs: A fast, memory-safe rewrite of the classic Unix yes command
Published on: 2025-06-21 01:20:29
A blazingly fast, memory-safe rewrite of the classic Unix yes command
Why rewrite yes in Rust? 🤔
Because the original yes command (written in shudders C) is:
❌ Not memory-safe
❌ Prone to buffer overflows
❌ Lacks modern error handling
❌ Missing zero-cost abstractions
❌ No fearless concurrency
❌ Not written in Rust
Features ✨
🚀 Blazingly fast - Outputs "y" at unprecedented speeds
- Outputs "y" at unprecedented speeds 🛡️ Memory safe - No segfaults, guaranteed!
- No segfaults, guaranteed! ⚡ Zero-cost abstractions - Maximum performance
- Maximum performance 🔥 Fearless concurrency - Ready for async/await (coming soon!)
- Ready for async/await (coming soon!) 🦀 100% Rust - No unsafe code blocks
- No unsafe code blocks 📦 Cargo integration - Easy to install and distribute
Installation 📦
cargo install yes-rs
Or build from source:
git clone https://github.com/rust-evangelists/yes-rs cd yes-rs cargo build --release
Usage 💻
Just like the original yes , but better:
# Output "y"
... Read full article.