A minimal cat clone written in Rust.
rat streams file contents to standard output using buffered I/O. It's designed to teach low-level file handling and Unix tool internals.
- Buffered file reading
- Streams raw bytes to stdout
- Memory efficient (no full file loading)
- Unix-style error handling
- Safe, idiomatic Rust
Development:
cargo run notes.txtInstall binary:
cargo build --release
sudo cp target/release/rat /usr/local/bin/
rat file.txtrat Cargo.toml
rat src/main.rs
rat /etc/hosts
- Single file only
- No stdin support
- No line numbering
- Fixed buffer size
Future versions will add full cat compatibility.
- Low-level file I/O
- Buffered reading/writing
- Error handling
- Data streaming
MIT License