Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: Resources for Learning Idiomatic Rust?
15 points by poletopole on Feb 23, 2021 | hide | past | favorite | 10 comments
I have more or less learned Rust from nostarch's book (which took about a month). However, I am far from being proficient with the language, not because I'm new to programming but because Rust is quite different than other languages I know. Is there a book or resources online that teach how to use the language effectively, such as patterns and best practices or even a cook book with examples?


I learned Rust from the book as well, the only programming book I actually read cover to cover (though a lot of stuff went over my head, so I am occasionally revisiting).

I found some complementary resources like the following: https://blog.burntsushi.net/rust-error-handling/

https://fasterthanli.me/ has a lot of very good Rust posts in varying levels

There are also some resources that are still incomplete, like the async book (https://rust-lang.github.io/async-book/) and Rust patterns (https://rust-unofficial.github.io/patterns/)

And there are youtube channels like: https://www.youtube.com/c/JonGjengset - He has videos about super advanced stuff (like implement a concurrent hash map), and the Crust of Rust which is more suitable for beginners Another one I like a lot is Ryan Levick (https://www.youtube.com/channel/UCpeX4D-ArTrsqvhLapAHprQ)


If you don't mind watching long videos Jon Gjengset's channel [0] is a great choise.

Then there are two books by Gankra

- The Rustonomicon [1]

- Learn Rust With Entirely Too Many Linked Lists [2]

Also there are three early access books on Manning

- Rust in Action [3]

- Rust Servers, Services, and Apps [4]

- Refactoring to Rust [5]

Lastly, if you're into security you may also like Black Hat Rust [6], also early access.

[0] https://www.youtube.com/c/JonGjengset/videos

[1] https://doc.rust-lang.org/nightly/nomicon/

[2] https://rust-unofficial.github.io/too-many-lists/

[3] https://www.manning.com/books/rust-in-action

[4] https://www.manning.com/books/rust-servers-services-and-apps

[5] https://www.manning.com/books/refactoring-to-rust

[6] https://academy.kerkour.com/black-hat-rust

Edit: formatting


Co-author of that book here. Thanks for reading. :)

I think overall you are at the part where Rust's documentation is at its weakest. Several people are working on more things here, but really, the basic advice I'd give you is to read and write a bunch of Rust code. The more you read, the more you'll absorb stuff like this. The more you write, the more things you'll need to figure out how to do, which will involve you looking at existing solutions, which will lead you to figure it out.

I wish I just had a second book to point you at, but alas, that doesn't really exist right now.


Your book was close to perfect I think in terms of learning the core language, it was very easy to read front to back. Most programming books tend to fall prey to being categorically "project" based which I hate.

To be honest there were some sections that I glossed over that I should probably go back and annotate. I have to agree that finding some good github projects that are well documented to analyze would be a good start, I only wish programmers put more effort into commenting and documenting their code, ha.


Thank you :) I wish so too.

You should check out projects by burntsushi, alex crichton, and david tolnay. They may use advanced or complicated features that you won't need to use in most Rust code, but they all write projects that are some of my favorite in Rust. And they generally do a good job of documenting things as well. I've ordered them in a totally subjective and probably wrong "least to most likely to find magic when reading their code" order. They're all great folks and write great projects though.


"least to most likely to find magic"

Thanks. That's an amazing superlative to have. :-) Hehe.


Thanks for the tip, will do.


I was in a similar position a few months ago. After reading the Rust Book, I felt I knew the concepts but still lacked the experience of writing Rust programs.

That being said, I have found the Rust track on exercism.io the best way for me to become more proficient with the language. It is great working through a challenge, getting mentor feedback, and also seeing how others solved the same problem.


Exercism.io looks interesting. I wonder though, how is it free though?


Looks like they are a non-profit and partially staffed by volunteers. Very cool!

https://exercism.io/about




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: