logoalt Hacker News

michaelmuretoday at 8:47 AM3 repliesview on HN

Any recommandation for a quality non-toy rust codebase to study?


Replies

maxbondtoday at 9:09 AM

Two arbitrary picks:

https://crates.io/crates/serde

https://crates.io/crates/regex

Anything covered by Gjengset's "decrusted" series: https://youtube.com/playlist?list=PLqbS7AVVErFirH9armw8yXlE6...

Sort of on the border between toy and not-toy; Gjengset implements a concurrent hash map: https://youtube.com/playlist?list=PLqbS7AVVErFj824-6QgnK_Za1... [17hr recorded over 3 streams]

josephgtoday at 12:32 PM

The rust standard library is excellent. Start more or less anywhere, and click "view source". Or open up the source code files on github.

There's often a lot more comments than code, which is kind of annoying. But it really is the best way to learn how a lot of good rust is written.

Vec is a good read: https://doc.rust-lang.org/src/alloc/vec/mod.rs.html

Here's the lovely slice::binary_search_by: https://doc.rust-lang.org/src/core/slice/mod.rs.html#2967-29...

mlvljrtoday at 8:52 AM

[dead]