mirror of
https://github.com/uutils/grep.git
synced 2026-06-10 16:15:11 -07:00
add-differential-fuzzer
Add a cargo-fuzz harness (fuzz_grep) that runs uu_grep and GNU grep on the same generated args/input and panics on any divergence, using the vendored uufuzz crate (adapted from uutils/coreutils to depend on crates.io uucore rather than a path). A CI workflow (.github/workflows/fuzzing.yml) builds the uufuzz examples, builds the fuzzer, and runs it for 60s. fuzz_grep is marked should_pass: false / continue-on-error since it currently surfaces real GNU-compatibility gaps (e.g. uu_grep rejects a repeated -m, GNU accepts).
Grep, now in Rust
A Rust implementation of GNU Grep. This project is an initial release and may contain bugs.
Building
Download Rust at: https://rustup.rs/
# Check out this repository
git clone https://github.com/uutils/grep
cd grep
# Build a release version
cargo build --release
# Run!
./target/release/grep --help
# Run tests (if needed; after making changes)
cargo test
Pre-commit hooks
This project uses pre-commit; run pre-commit install to enable the git hooks.
Known Issues
- Does not take
LANG, etc., into account for handling file encodings (non-UTF8 matches are treated as binary) - No localization support yet
- Performances need to be improved
Contributing
To contribute to uutils, please see CONTRIBUTING.
License
uutils is licensed under the MIT License - see the LICENSE file for details
GNU Grep is licensed under the GPL 3.0 or later.
Languages
Rust
90.9%
Shell
6.4%
Python
2.7%