Vibeleaderboard
Index / tool
Visit docs.rs
Category
Developer Tools
Rank
No. 1454Tools index
Pricing
Open Source
Type
TOOL
Use case
Coding
Interfaces
SDK
GitHub
229 stars
Latest release
v1.6.5
Date

About

100% POSIX and glibc-compatible globbing library for C, Zig, and Rust — faster than glibc, supports modern formats and gitignore syntax.

What it does

Zlob scans directory trees or filters path lists using wildcard patterns. It can collect results in memory, stream entries through callbacks, reuse compiled patterns, respect ignore rules, and fetch selected file metadata during traversal.

Why it's ranked here

The case rests on unusually broad scope paired with deliberate performance engineering. Pattern analysis avoids irrelevant directories, common extension sets compile to SIMD bitmasks, and directory walking uses platform-specific system interfaces. The repository also documents compatibility tests drawn from several established implementations. The strongest speed figures remain project-reported benchmarks, not independent validation.

What's good

One engine serves filesystem discovery, in-memory filtering, and direct file walking across three languages. Compiled patterns support allocation-free repeated matching. The walker offers parallel collection or callbacks, selective metadata retrieval, depth and thread controls, ignore-rule filtering, symlink cycle protection, and optional input-order-preserving batch results.

Tradeoffs

Modern behavior is flag-driven, so defaults require attention. Ignore filtering, extended patterns, hidden-file matching, and symlink traversal are not all enabled together by the recommended glob settings. Unsorted output is favored for speed. Rust consumers also need Zig installed during ordinary native builds, while documentation builds skip that native compilation.

How to use it well

Use it in C, Zig, or Rust tools that repeatedly search large trees, filter existing path batches, or need traversal with selective metadata. Compile recurring patterns and process paths in batches. Choose collection for maximum throughput and callbacks when retaining every entry wastes memory. It does not provide a general content-search engine.

Technical notes+

README.md describes pattern pre-analysis, SIMD matching, gitignore filtering, and platform-specific traversal. Makefile builds shared and static libraries plus a CLI, installs the C header, and runs Zig, C, Rust, and libc-comparison tests. rust/build.rs generates FFI bindings with bindgen, invokes Zig for a static library, maps numerous Rust targets to Zig targets, and repacks Apple archives for alignment. rust/src/pattern.rs wraps reusable ZlobPattern values with allocation-free single-path matching and batch index APIs. rust/src/walk.rs exposes WalkBuilder with worker, depth, metadata, ignore, streaming, and collection controls. rust/src/zlob.rs owns native results, frees them on Drop, and exposes zero-copy string iteration through stored path lengths.

Observed

Primary implementation language
Zig, with C and Rust public bindings
Interfaces
C library, native Zig module, Rust crate, and command-line executable
Build outputs
Shared library, static library, C header, and CLI executable
Rust packaging
Published crate builds the bundled native library through Zig and generates bindings with bindgen
Platform support
Linux, macOS, iOS, Windows, FreeBSD, NetBSD, and Android targets are represented
Test structure
Build targets run Zig tests, C API tests, Rust tests, and libc comparison tests

Read from README.md, Makefile, rust/build.rs, rust/src/lib.rs, rust/src/walk.rs, rust/src/zlob.rs, rust/src/error.rs, rust/src/flags.rs, rust/src/slices.rs, rust/src/pattern.rs, rust/src/ffi_stub.rs.

What it can do

  • Match file paths using glob patterns

    File paths and glob patterns → Boolean match results or filtered file lists

  • Parse gitignore syntax patterns

    Gitignore-style pattern strings → Parsed pattern rules for file matching

  • Filter files using gitignore rules

    File paths and gitignore patterns → Filtered list of non-ignored files

  • Perform POSIX-compliant glob matching

    File paths and POSIX glob patterns → Matching file paths or boolean results

  • Execute glibc-compatible pattern matching

    Strings and glob patterns → Pattern match results

Tags

globbingczigrustposix

Tech Stack

CMakefileRustShellZig

Comments (0)

No comments yet

Editorially curated, with community endorsements as a secondary signal. Corrections welcome.