wildcard-glob 11.2.0

Zero-dependency, zero-allocation compiled wildcard and path glob pattern matcher supporting *, **, ?, character classes, brace alternation, and multi-pattern GlobSet.
Documentation
  • Coverage
  • 100%
    11 out of 11 items documented0 out of 0 items with examples
  • Size
  • Source code size: 48.5 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 356.9 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 1s Average build duration of successful builds.
  • all releases: 2s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates-dev/ctares
    2 1 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • vshengbro

wildcard-glob

Zero-Dependency Compiled Wildcard & Path Glob Matcher with Brace Alternation

Crates.io Version Docs.rs CI Status Rust 2024 License: MIT

Workspace Overview · API Docs


Overview

wildcard-glob compiles path and wildcard patterns (*, **, ?, [...], {a,b}) into zero-allocation linear-time GlobPattern and multi-pattern GlobSet matchers without external dependencies.

Installation

cargo add wildcard-glob

Usage

use wildcard_glob::{GlobPattern, GlobSet};

let pattern = GlobPattern::compile("src/**/*.{rs,toml}").unwrap();
assert!(pattern.is_match("src/core/lib.rs"));

let set = GlobSet::compile(["/healthz", "/api/v1/**", "**/*.rs"]).unwrap();
assert!(set.is_match("/api/v1/orders/42"));

Verification

cargo run -p crate-cli -- fmt --check
cargo clippy -p wildcard-glob --all-features --all-targets -- -D warnings
cargo test -p wildcard-glob --all-features

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For inquiries, please contact the author at root@devhub.vip.