zg 0.1.0

Small query-normalization helpers for the zg search tooling.
Documentation
  • Coverage
  • 90%
    9 out of 10 items documented0 out of 9 items with examples
  • Size
  • Source code size: 5.36 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.44 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 40s Average build duration of successful builds.
  • all releases: 40s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • cnrpman

zg

zg is a small Rust library for query normalization and lightweight matching.

The 0.1.0 release is intentionally narrow: it gives the future zg / zettagrep tooling a real, publishable core instead of an empty placeholder crate.

What it does today

  • trims input and folds repeated whitespace
  • lowercases query text for stable matching
  • splits normalized terms
  • checks whether all query terms occur in a candidate string

Example

use zg::{matches_query, Query};

let query = Query::new("  Rust   Search ");
assert_eq!(query.normalized(), "rust search");
assert!(matches_query("rust search", "Rust-powered search tools"));

Scope

This crate is deliberately small in 2026. The goal is to stabilize basic query handling first, then extend the crate with richer search primitives in later releases.