Settings

Theme

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

9 points by hazbo 3 years ago · 5 comments · 1 min read


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 3 years ago

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 3 years ago

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 3 years ago

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

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

ianpurton 3 years ago

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

oslac 3 years ago

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

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection