2026-05-28 21:20:19 +02:00
[](https://crates.io/crates/uu_grep)
[](https://discord.gg/wQVJbvJ)
[](https://github.com/uutils/grep/blob/main/LICENSE)
[](https://deps.rs/repo/github/uutils/grep)
[](https://codecov.io/gh/uutils/grep)
2026-05-31 07:59:22 +00:00
[](https://codspeed.io/uutils/grep?utm_source=badge)
2026-05-28 21:20:19 +02:00
2026-05-28 20:19:53 +02:00
# Grep, now in Rust
A Rust implementation of [GNU Grep ](https://www.gnu.org/software/grep/ ).
This project is an initial release and may contain bugs.
2026-06-03 17:56:23 +02:00
## Install
```shell
cargo install uu_grep
```
2026-06-05 13:34:16 +02:00
## š Try it online
You can try `grep` directly in your browser on the [uutils playground ](https://uutils.github.io/playground/ ).
Arguments (and a full command) can be passed through the URL via the `cmd` query parameter, for example:
```shell
printf 'š rocket\nš°ļø satellite\nš moon\nā star\n' | grep š
```
[Run it in the playground ](https://uutils.github.io/playground/?cmd=printf%20%27%F0%9F%9A%80%20rocket%5Cn%F0%9F%9B%B0%EF%B8%8F%20satellite%5Cn%F0%9F%8C%99%20moon%5Cn%E2%AD%90%20star%5Cn%27%20%7C%20grep%20%F0%9F%8C%99 )
2026-05-28 20:19:53 +02:00
## Building
Download Rust at: https://rustup.rs/
```shell
# 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
```
2026-05-29 11:08:47 +02:00
## Pre-commit hooks
This project uses [pre-commit ](https://pre-commit.com ); run `pre-commit install` to enable the git hooks.
2026-05-28 20:19:53 +02:00
## Known Issues
* Does not take `LANG` , etc., into account for handling file encodings (non-UTF8 matches are treated as binary)
2026-05-28 22:03:25 +02:00
* No localization support yet
2026-05-30 19:25:27 +02:00
* Performances need to be improved
2026-05-28 20:19:53 +02:00
## Contributing
To contribute to uutils, please see [CONTRIBUTING ](CONTRIBUTING.md ).
## 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.