HACKER Q&A
📣 hazbo

What are some good examples of Rust code bases to read and learn from?


As the title states, just interested in finding some examples people think would be particularly good reads, especially for people approaching the language for the first time.

Ideally examples that show what a "complete" Rust project might look like in terms of the way it is laid out and what associated tooling / scripts that are commonly used or included in Rust code bases.


  👤 digitalsanctum Accepted Answer ✓
In general, the crates listed here would be good to look at https://blessed.rs/crates or browse the Rust topic at GitHub: https://github.com/topics/rust

For beginners, maybe look at smaller projects like libraries and CLIs without a lot of dependencies.


👤 bgar
I would advise not looking at libraries as a beginner; because they’re meant to be as generic as possible, they tend to abuse the type system and are overall a lot harder to parse for a beginner. Stick to reading the Rust code for standalone programs.

👤 surprisetalk
Roc is a new programming language written in Rust (and some Zig).

https://github.com/roc-lang/roc/tree/main/crates


👤 ianpurton
Try rust-on-nails.com and https://github.com/purton-tech/cloak

👤 oslac
rust compiler, rust-analyzer, the top rust crates (ie. rand is a great example)