logoalt Hacker News

hacker_homieyesterday at 6:35 PM5 repliesview on HN

Move high value crates into the standard library?


Replies

kibwenyesterday at 9:01 PM

Indeed, I'm all for maximizing the amount of modules in the standard library. It's pretty obvious to me that Python thrives because of, not despite of, its standard library, "dead batteries" and all.

However, don't make the mistake of thinking that Rust has a small standard library. Read any Rust release and you'll see dozens of new APIs added with every single one. I'm tempted to paste the entire list of stabilized APIs from the most recent release for emphasis, but rather than making this comment three dozen lines longer, just look for yourself: https://blog.rust-lang.org/2026/04/16/Rust-1.95.0/#stabilize...

In particular, most recently the aforementioned release stabilized the cfg_select! macro for convenient conditional compilation, which obviates the popular cfg_if crate: https://doc.rust-lang.org/stable/std/macro.cfg_select.html

SAI_Peregrinusyesterday at 11:10 PM

An extra tier of standard library which can make breaking changes, perhaps. Rust's stability guarantee for std means cryptography really shouldn't go in there, since sometimes algorithms & protocols get broken (DES, MD5, SHA1, etc.) and need to be removable. Without breaking changes you get stuck with security vulnerabilities, if not from cryptography then from other poorly-designed APIs.

hacker_homieyesterday at 6:56 PM

Maybe give crates a gold star if they have no external dependencies?

show 2 replies
orfyesterday at 6:37 PM

Please no, that’s a terrible outcome.

show 1 reply
vsgherziyesterday at 6:50 PM

This bloats the std library and forces lots more work and stress on the rust dev team. Not to mention it’ll add more churn to the std lib.

show 1 reply