multimatch 0.1.1

Multi-pattern matching engine — Aho-Corasick + regex with optional Hyperscan SIMD acceleration
Documentation
//! Build patterns from a simple string list.
//!
//! Run: cargo run --example from_list

use multimatch::Scanner;

fn main() {
    let keywords = multimatch::from_literals(&[
        "eval(", "exec(", "system(", "passthru(",
    ]).expect("compilation failed");

    let code = b"<?php eval($input); echo 'safe'; ?>";
    let matches = keywords.scan(code);

    println!("Found {} dangerous calls", matches.len());
    for m in &matches {
        let s = std::str::from_utf8(&code[m.start..m.end]).unwrap_or("?");
        println!("  '{}' at offset {}", s, m.start);
    }
}