Conversation
Introduce two new no_std crates as lighter alternatives to globset (no regex): - glob-matcher: no_std fork of glob-match 0.2.1 (MIT) - glob-set: globset-compatible API with strategy-based dispatch (extension hash, literal, prefix, suffix, compound suffix, prefix+suffix, brace expansion) and Aho-Corasick pre-filter fallback. 2x faster than globset for matching, 21x faster for building. Also fix cargo-furnish to skip workspace license inheritance when a crate ships its own LICENSE file (e.g. glob-matcher's MIT license).
…obMap, TinyGlobSet Replace the hand-rolled arena tries (PrefixTrie/SuffixTrie) with the tried crate's double-array trie for O(key-length) prefix/suffix lookups. Extract shared matching logic into a MatchEngine (with first_match support) that backs both GlobSet and the new GlobMap. Rename the original linear-scan implementation to TinyGlobSet for use cases where fast build time matters more than query throughput.
Move crate-level documentation into README.md with three doctest-verified examples (exact-match, common-prefix search, zero-copy borrowed data). Use include_str! to pull the README as crate docs. Standardize Cargo.toml description and use workspace license.
Migrate schemastore's CompiledCatalog from the external `globset` crate with a hand-rolled three-tier optimization (exact filename BTreeMap, per-extension GlobSets, fallback GlobSet) to a single `GlobMap` from our `glob-set` crate. The GlobMap's MatchEngine already provides these optimizations (literal hash, extension hash, prefix/suffix tries, Aho-Corasick), making the three-tier scheme unnecessary. Patterns without `/` are now prepended with `**/` during compilation so they match at any directory depth, eliminating the need for separate path-then-filename matching.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
schemastore::CompiledCatalogfrom the externalglobsetcrate to our ownglob-setcrate'sGlobMapGlobMap'sMatchEnginealready provides these optimizations (literal hash, extension hash, prefix/suffix tries, Aho-Corasick)/are prepended with**/at compile time so they match at any directory depth, eliminating the two-step path-then-filename matchingTest plan
cargo test -p schemastore— all 9 existing tests passcargo test -p lintel-identify -p lintel-validate -p lintel-annotate -p lintel— all 150 downstream tests passcargo check --workspace— clean compile