Full Changelog: v1.0.0...v2.0.0
TLDR
- Better error handling
- Added crate
clap
for more robust CLI - Added crate
colored
for colored output (it automatically disables itself when using NO_COLOR env var) - Switched to edition 2024 which makes the MSRV now Rust 1.85
- Added LTO and Codegen units optimizations for faster runtime speed
- Swapped from MIT license to GPL 3.0
- Added
forbid(unsafe_code)
andwarn(clippy::pedantic)
global directives to ensure future compliance with those - Allows passing the file path directly to the CLI (e.g.
grep-rs <pattern> <file>
) but STDIN still works (e.g.cat <file> | grep-rs <pattern>
) - Added
-C/--case-sensitive
flag - Added
-l/--line-numbers
flag that shows the numbers of each line matched - Added
-c/--color
flag to allow changing the color of highlighted text - Swapped to using
BufReader
and iterating directly throughreader.lines()
to avoid putting the whole file into memory. - Added test cases that can be ran with
cargo test
- README now is more complete