HeadlinesBriefing favicon HeadlinesBriefing.com

Zlob: A 10× Faster, POSIX‑Compatible Globbing Library

Hacker News: Front Page •
×

Zlob, a new globbing library written in C, Zig, and Rust, promises 10× speed gains over glibc’s legacy implementation while staying fully POSIX‑compatible. By avoiding glibc’s slow sorting and missing modern patterns, it delivers faster file matching for developers who rely on shell‑style globbing in build scripts and tooling.

Zlob’s performance stems from a SIMD‑first design and direct use of the getdents64 syscall for directory traversal. It parses patterns ahead of time, turning expressions like `./**/*.c` into a lightweight prefix list and a SIMD bitmask that matches multiple extensions simultaneously, cutting unnecessary directory opens.

Compatibility checks show zlob passes 100 % of glibc’s test suite, Rust’s glob crate, and Node.js’s fs.glob, covering over 450 patterns. It supports braces, tilde expansion, gitignore filtering, and Bash extglob syntax, making it a drop‑in replacement for projects that need modern glob features without sacrificing portability.

By delivering a faster, feature‑rich globbing engine, zlob can reduce build times in large codebases and simplify tooling that previously relied on slow system calls. Developers will likely adopt it in CI pipelines, language servers, and IDE extensions, while the Zig foundation hints at future SIMD optimizations across platforms.