For regex specifically, the usual "regex" crate is fantastic and provides very good performance guarantees (no exponential behaviour, ever!), unlike a lot of regex libraries. However, it also comes with the tradeoff of not supporting arbitrary lookahead/lookbehind or many regex extensions, so people needing those features might need a different crate.
There's a nice discussion on another thread: https://news.ycombinator.com/item?id=33510976
In Javascript this led to, well, npm. Because there's no standard library, and everyone ended up reinventing everything.
It's easy to find drawbacks of either extreme. I find Rust's approach of favoring competing, versioned libraries over standard library inclusion generally works well. Many of the libraries managed to significantly improve performance and ergonomics because they can have space to improve their API, and explore which behaviors and guarantees are useful. The biggest downside is that it's more difficult to protect against supply chain attacks.
Supply chains are real and being scared to design good API that will survive test of time sounds like poor excuse
At worst you could steal API design from some mature and battle tested base class libs like .net
There is nothing stopping us from having a small standard library and a set of official - but optional - crates for common things like regex. This is the best of both worlds in my view.
- You type something in expecting autocomplete, its not there. "Huh, thats weird"
- Look it up online. Sure enough, its not in the standard library. OK, what should I use then?
- Do research to figure out what 3rd party crate to use
- Tend to abstract/isolate those bits in case you need to rip it out for a different implementation later
To me the right approach is to publish an "official" meta package that depends on a few core packages that work well together.
Sure it might be overkill or "underkill ?) for some ?