glob
Support for matching file paths against Unix shell-style glob patterns in Rust.
Repository Health
Technical Analysis
glob is a small, foundational Rust crate maintained by the Rust Project that implements Unix shell-style wildcard pattern matching (*, ?, [...], **) against file paths. Its glob() function walks the filesystem and returns an iterator of paths matching a given pattern, while Pattern exposes the underlying matcher for testing strings against a glob pattern without touching the filesystem at all.
Despite its small surface area, glob is one of the most widely depended-upon crates in the Rust ecosystem (500M+ total downloads) because it’s the standard building block any Rust tool uses when it needs to accept *.txt-style patterns from users — build tools, linters, test runners, and CLI utilities that need to expand wildcard arguments into concrete file lists.
What You Get
- A
glob()function returning an iterator of filesystem paths matching a shell-style pattern - Support for
*,?,[...], and**(recursive directory) wildcard syntax - A standalone
Patterntype for matching arbitrary strings against a glob pattern without touching the filesystem - Case-insensitive and other configurable matching options via
MatchOptions - Long-term API stability as a Rust Project-maintained crate with minimal dependencies
Common Use Cases
- Expanding wildcard file arguments (e.g.
*.rs,src/**/*.toml) passed to a CLI tool into a concrete file list - Build tools and code generators that need to discover source files matching a pattern
- Linters and formatters that accept include/exclude glob patterns for file selection
- Test runners that discover test files via glob patterns
- Validating whether a given string matches a user-supplied wildcard pattern without hitting the filesystem
Under The Hood
Architecture - The entire crate is implemented in a single src/lib.rs file (~1,500 lines), reflecting its narrow, focused scope: a Pattern struct compiles a glob string into an internal matcher representation, a glob() function combines that matcher with a std::fs::read_dir-based directory walker to lazily yield matching PathBufs as an iterator, and MatchOptions controls case sensitivity and other matching behavior. There’s no plugin system or extensibility layer — the crate deliberately does one thing.
Tech Stack - Pure Rust with zero runtime dependencies (only tempfile and doc-comment as dev-dependencies for testing), targeting Rust 1.63.0+ per Cargo.toml. This minimal dependency footprint is a deliberate design choice for a crate this foundational, since a large fraction of the Rust ecosystem depends on it transitively and any added dependency would multiply across thousands of downstream crates.
Code Quality - Tests live both inline in src/lib.rs (18 #[test] functions) and in a separate tests/glob-std.rs integration test file exercising filesystem-based globbing end to end. The repository includes a triagebot.toml for Rust Project issue-triage automation and a CHANGELOG.md tracking releases, consistent with other rust-lang-maintained crates. GitHub’s health signal shows infrequent maintenance activity, which is expected and appropriate for a mature, feature-complete utility crate rather than a sign of neglect.
API Design - The API is deliberately minimal: a single glob(pattern: &str) -> Result<Paths, PatternError> function covers the common case, while Pattern::new() and Pattern::matches() expose the matcher directly for callers who want to test strings without filesystem access. This two-function surface (plus MatchOptions for edge cases) makes the crate trivial to learn and reason about, at the cost of not supporting more advanced globbing semantics (e.g. brace expansion) that other ecosystems’ glob libraries provide.
Used by 13 apps in this directory
Anarlog
Note Taking · AI Assistants · Productivity
Anarlog is an open-source, local-first AI meeting notetaker that records, transcribes, and summarizes meetings entirely on your device — no cloud lock-in, no mandatory account, and every note saved as a plain markdown file you own forever.
claw-code
AI Agents · AI Code Assistants
A Rust-built CLI agent harness for Claude AI with persistent sessions, MCP tool integration, plugin hooks, and multi-provider support — designed to run autonomous coding workflows without human babysitting.
cocoindex
Data Engineering · AI Development
An incremental data indexing engine that keeps AI agent context perpetually fresh by reprocessing only what changed.
Enso
Analytics · Data Engineering · Low Code Platforms
A visual and textual programming platform for data prep and analysis where the node graph and the underlying Enso code are always perfectly in sync, built by an Alteryx co-founder on a GraalVM engine.
fabro
Developer Tools · Devops
Define AI agent workflows as code graphs, route tasks across any LLM, and intervene only where it matters.
GitButler
Developer Tools · Devops · AI Development
Git, but better — a modern version control client with stacked branches, parallel workflows, unlimited undo, and first-class support for AI-powered development.
Graphite
Code Editors · Design Tools
A free, open source procedural 2D design tool that unifies vector, raster, motion graphics, and generative art in a single node-based nondestructive workflow.
iii
Developer Tools · Devops
Compose, extend, and observe every backend service in real time using three primitives: Workers, Functions, and Triggers.
Jan
AI Assistants
Run LLMs 100% locally with full privacy, or connect to cloud AI — your machine, your data, your control.