#utility #experimental #goal #collection #process #text #scan-lex


Gaze is a small utility library with the goal of making it easier to scan/lex text and collections

5 releases (breaking)

0.5.0 Jul 2, 2023
0.4.0 Sep 27, 2021
0.3.0 Sep 24, 2021
0.2.0 Sep 9, 2021
0.1.0 Sep 4, 2021

#721 in Text processing

31 downloads per month
Used in 6 crates (2 directly)

MPL-2.0 license

129 lines


Logo of a raccoon staring


You find yourself standing on the hill outside your childhood village. A place you've been many times before but this time everything seems foreign. The sparse array of calm, small lights you normally see spread through town at this time of night is not to be seen. Instead, you see disruptive, large flares of light. And instead of the normal murmur of citizens finishing their day before going home you hear a steady roar of distress.

As you stand in the darkness a small cloaked figure scurries towards you. You greet the creature with a handful of fruits and nuts that you pull from your pocket. They take your greeting into their paws and quickly devour it. Looking down upon them, you see their eyes reflect the distant light, made even more noticeable behind their natural black mask. They look up to you after eating, swipe at their right whiskers twice, you nod, in a single motion they jump out of their cloak and join the gaze gathered behind you.

You take one last moment to appreciate the irony of joining forces with one of nature's most chaotic forces to combat chaos. You draw in a deep breathe realizing that many mistakes will be made tonight. You raise your black, sleeved arm and point towards your home. You feel the gaze rush around you and see them run down the hill. You follow behind.


Gaze is a small utility library with the goal of making it easier to process text in Rust.

It's experimental at the moment, the API is likely to change often and it is not optimized at all, so you can play around with it, but don't expect much. I'm not sure yet if this is even a good idea 🤷

For examples see the tests. Real world examples will be linked soon.


  • Provide a straight forward pattern for working with text and collections
  • Provide common helper functions
  • Encourage the use of functions
  • Handle unicode well (thanks to unicode-segmentation)
  • Provide diagnostic information for support tools, error handling, and debugging

Logo picture credit: https://unsplash.com/@marcus_d