HACKER Q&A
📣 mdwalters

Are there any easy Rust tutorials out there?


I've not been able to grasp Rust, and I've looked through the Rust book, and Learn X in Y minutes, and still having difficulty confidentially learning Rust. Are there any easy tutorials out there for Rust that you've used in the past?


  👤 mgomez Accepted Answer ✓
Give "A half-hour to learn Rust" a try: https://fasterthanli.me/articles/a-half-hour-to-learn-rust

Books/tutorials/etc. never really worked for me because they were all "happy path" exercises (read: too boring). Things only started clicking when I had to overcome obstacles while porting projects written in different languages over to Rust.


👤 duped
There's a steep learning curve to the language. The key thing to remember is that you cannot have multiple mutable aliases to the same data.

The best thing to do is write enough code in projects you understand until the fundamentals click. Stay away from async until you get those, then why async is the way it is will make sense.


👤 leandot
Try implementing something useful for you in Rust from scratch, without following a tutorial. Books will only get you so far.


👤 dnh44
Try the Rustlings course or the interactive version of the rust book.

https://rust-book.cs.brown.edu


👤 sevenpeas
Do it the long, slow way. Write and run every example in the Book, in order. It takes you from “hello world” to a multi-threaded web server. This is a long task, so spread it over a few days. Read the text as you’re coding to understand it and get the fundamentals down. The Book is really more of a tutorial than a reference.

After writing out the book’s examples, you will probably struggle with borrowing but after a few weeks of building things it will click. You will then face an overwhelming urge to write and rewrite everything in Rust.


👤 potsandpans
A lot of good suggestions in thread so far. I'll take an alternative approach:

What are you having a hard time with? What are you familiar with, and what concepts are you getting stuck on?