grippo 0.3.0

Grok, regex, CEL and scrubbing on typed primitives. Up to 9 times faster than the stock Rust regex.
Documentation
// Project:   grippo
// File:      src/lib.rs
// Purpose:   Crate root
// Language:  Rust
//
// License:   Apache-2.0
// Copyright: (c) 2026 HYPERI PTY LIMITED

//! Grok, regex, CEL and scrubbing on typed primitives.
//! Up to 9 times faster than the stock Rust regex.
//!
//! Grok and regex are how a pattern is written, not how it runs. Every
//! matcher and parser reports the [`MatcherTier`] it runs on, and the regex
//! engine runs only when no native route covers the pattern.
//!
//! # Sync by default, tokio when you ask
//!
//! grippo is sync. It takes `&[u8]` and `&str`, loads no files and opens no
//! sockets, so parsing, matching and scrubbing have no async form: call them
//! on each record wherever it is. Bytes meet I/O only in `grippo::io` (the
//! `framing` feature), where a stream is framed into records and records into
//! a stream. `io::Scanner` and `io::Writer` do that with no I/O at all, and
//! `io::frames` and `io::write_frames` run them over `BufRead` and `Write`.
//! The `tokio` feature adds `io::tokio`, with the same two helpers over
//! `AsyncRead` and `AsyncWrite` and the tokio-util codec under them. It never
//! changes a sync item, and nothing else in grippo needs it.

#![cfg_attr(docsrs, feature(doc_cfg))]

// Generated code names this crate `::grippo`, as it would from outside.
extern crate self as grippo;

pub mod cost;
mod dialect;
#[cfg(feature = "parse")]
mod kernel;
mod tier;

pub use dialect::Dialect;
pub use tier::MatcherTier;

#[cfg(feature = "strmatch")]
pub mod strmatch;

#[cfg(feature = "parse")]
pub mod parse;

#[cfg(feature = "parse")]
pub mod field;

#[cfg(feature = "time")]
pub mod time;

#[cfg(feature = "parse-grok")]
pub mod grok;

#[cfg(feature = "compose")]
pub mod compose;

#[cfg(feature = "parse")]
pub mod format;

#[cfg(feature = "charset")]
pub mod charset;

#[cfg(feature = "framing")]
pub mod io;

#[cfg(any(
    feature = "decode-base64",
    feature = "decode-hex",
    feature = "decode-gzip",
    feature = "decode-zlib",
    feature = "decode-zstd",
    feature = "decode-snappy",
    feature = "decode-text",
    feature = "decode-rsyslog"
))]
pub mod decode;

#[cfg(feature = "scrub")]
pub mod scrub;

#[cfg(feature = "convert")]
pub mod convert;
#[cfg(feature = "domain")]
pub mod domain;
#[cfg(feature = "expr")]
pub mod expr;
#[cfg(feature = "json-depth")]
pub mod json;
#[cfg(any(feature = "parse", feature = "record"))]
pub mod number;
#[cfg(any(
    feature = "parse",
    feature = "scrub",
    feature = "xml",
    feature = "json-paths"
))]
pub mod path;
#[cfg(feature = "record")]
pub mod record;
#[cfg(feature = "ua")]
pub mod ua;
#[cfg(feature = "uri")]
pub mod uri;
#[cfg(feature = "windows")]
pub mod windows;
#[cfg(feature = "xml")]
pub mod xml;

#[cfg(test)]
mod corpus_tests;
#[cfg(test)]
mod shared_tests;