1. The glob crate, which is stdlib ejecta from pre-1.0, and appears to be in maintenance mode (it hasn't seen a "real" commit since Jan 2016).
2. The regex crate, which is very actively developed (and in fact inspired by rsc's writings and Go's regex implementation).
If it's the former, then indeed it's probably as disinteresting as "nobody has bothered to ever benchmark this crate". But if it's the latter then I bet burntsushi would be very interested!
I understand why monolithic utility and frameworks need constant updating. It seems that in the "micro library" world, though, we should see and encourage "finished" libraries.
EDIT: It's also worth mentioning that there's an important mental distinction between a "1.0-level" maintenance mode crate and a pre-1.0 maintenance mode crate, as the former at least implies that somebody considers the crate to be marginally usable and feature-complete. glob is a pre-1.0 crate, so even though patches are accepted, I wouldn't necessarily consider it to be well-vetted without doing more research.
https://github.com/BurntSushi/ripgrep/tree/master/globset
> This crate implements globs by converting them to regular expressions, and executing them with the regex crate.
extern crate glob;
extern crate time;
use glob::glob;
use time::PreciseTime;
fn main() {
std::env::set_current_dir("/tmp/glob").expect("cd");
for i in 0..100 {
let pattern = "a*".repeat(i)+"b";
let t = PreciseTime::now();
let mul = 100;
for j in 0..mul {
for entry in glob(&pattern).expect("Failed to read glob pattern") {
match entry {
Ok(path) => println!("{:?}", path.display()),
Err(e) => println!("{:?}", e),
}
}
}
let t1 = PreciseTime::now();
println!("{:?} {:?}", i, (t.to(t1).num_nanoseconds().expect("ok") as f64)/1e9/(mul as f64))
}
}
Honestly I'm not too worried about Rust's performance here: it's on the right side of the fence.The translation from glob to regex at the syntax level is likely a non-factor. It's the compilation of the regex that probably starts to matter.