News for hackers. Stuff that matters.

Ask HN: 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.

( 5 comments | 2 points | on HN )
Re:Ask HN: What are some good examples of Rust code bases to... by oslac on Sunday February 26, 2023 @08:44AM (#34945475)
rust compiler, rust-analyzer, the top rust crates (ie. rand is a great example)
Re:Ask HN: What are some good examples of Rust code bases to... by surprisetalk on Sunday February 26, 2023 @10:15AM (#34946148)
Roc is a new programming language written in Rust (and some Zig).

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

Re:Ask HN: What are some good examples of Rust code bases to... by ianpurton on Sunday February 26, 2023 @10:28AM (#34946245)
Try rust-on-nails.com and https://github.com/purton-tech/cloak
Re:Ask HN: What are some good examples of Rust code bases to... by digitalsanctum on Monday February 27, 2023 @01:48PM (#34960342)
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.

Re:Ask HN: What are some good examples of Rust code bases to... by bgar on Tuesday February 28, 2023 @07:21PM (#34976971)
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.