Closed oconnor663 closed 1 year ago
You're actually not the first person to point that out. I wonder if it would be worth including parts of the standard library in the list. I feel like to_be_bytes
, etc probably aren't that discoverable on their own. OTOH, that could bloat the list out quite a lot if Vec and Result need to be on there.
Yeah there are a bunch of stdlib things like [T]::split_at_mut
and String::from_utf8_lossy
that you really need to know about to get work done, but which are hard to search for if you don't already know their names. My instinct is that it's hard to be both a beginner tutorial and a list of blessed crates at the same time, though, and that you shouldn't feel bad about only doing one of those things :)
One of the nice things about Rust having a not-giant stdlib is that it's reasonable to actually try to read through it, especially modules like std::collections
and std::iter
. But there are still a bunch of modules like std::fmt
and std::task
where it's more like "Hmm this is actually just a bunch of machinery that you don't want to think about until you need it later." It might be nice to have a project along the lines of Rust By Example that tries to be "a tour of the Rust stdlib modules that are actually worth your time to read".
I think
byteorder
was common and indispensable prior to the introduction ofto_<endian>_bytes
andfrom_<endian>_bytes
in Rust 1.32. But now that those are standard, I think it's less common to have a need for that crate in new code.