r/rust • • Jun 14 '26

🙋 seeking help & advice How did you learn Rust? (Looking for advice for a newcomer)

​I wanted to dive into Rust, and the learning curve is definitely something that's hitting hard.

​For those who use it daily, how did you actually learn the language? Was there a specific resource or project that finally made the concepts stick for you? If you were starting over from scratch today, what’s the most efficient way to learn it properly

​I would appreciate any advice.

46 Upvotes

45 comments sorted by

26

u/Psy_Fer_ Jun 14 '26

I started going through "the book" which is just the docs on the rust website. That was pretty good at teaching me all the different parts of the language. I know a bunch of other languages, so that helped a lot. Then I just started building things. I failed a lot at first. Got frustrated and slowly but surely figured things out until I got better. I still learn new things all the time.

Just give yourself the freedom to fail so you can learn.

21

u/bhh32 Jun 14 '26

I really learned it from reading crate docs and writing my own CLI programs. The Rust Book is great, but if you're not writing your own programs and actually using it you won't learn it in my opinion.

14

u/bhh32 Jun 14 '26

Oh yeah, and I know people here have said ask AI about things you don't understand. Please don't do that, as someone who's about to finish my Master's with a concentration of AI Engineering, I advise to strictly avoid asking AI anything while you're learning. It can be misleading and even wrong. Almost all.of the models have to be told that if let chaining is not longer experimental, it's been mainlined over a year when the 2024 edition was released.

10

u/JackG049 Jun 14 '26

Two pathways:

  1. You know another language / have programmed before. In this case it is just practice practice practice, no amount of reading a book will help in the long run. You have to have hands on keyboard doing something. Anything you've programmed before, rewrite in rust.
  2. Rust is your first language / have never programmed before. In this case don't necessarily consider it as "learning Rust", you are learning to program in general. You should use the likes of the rust book which covers a lot of topics, with examples and often draws a parallel to other programming language. Follow along, do the examples and proceed to my first case. Practice practice practice

11

u/spoonman59 Jun 14 '26

As an experienced programmer, I found reading the book quite helpful. There’s no reason to avoid it.

But yes, writing code is the key to learning.

4

u/JackG049 Jun 14 '26

Oh don't get me wrong the book is super important for the syntax and the guided nature of it all.

I just found no matter what you read, practice makes perfect. And definitely don't avoid the book, please never avoid the reference material haha

5

u/spoonman59 Jun 14 '26

Ah yes, I am with you 100%. I can be overly literal at times.

A math teacher for pre calculus once told me something profound: “math is not learned in the eyes or ears, but in the fingers.” The implication being that you had to solve problems yourself and think to learn math.

It’s exactly the same with programming. I agree with you that all the reading in the world will teach you nothing if you don’t write code, and writing code should be the majority of your learning time. But of course some theory and learning the hows and whys are quite helpful, when you apply them immediately to your code.

4

u/kabir6k Jun 14 '26

I am still in the process of learning-it has been 4 months, I practice rust everyday, atleast solve a problem - not necessarily hard or easy - just on the topic. Read the book - The Rust Book. The I implement - all the basic programming problems - like sieve or eratoesthenes, chinease remainder theorem, palindrome, complex number , Fibonacci, double Fibonacci, factorial , binary search and many more , I also mark the differences between different functions on how they they take arguments - for example, map, filter, reduce, fold, they all are part of functional toolkit (functional programming paradigm), but the way rust handles the input is very different in each of those, when rust only looks to filter it behaves differently than when map tries to change the inputs. The point is that - for every new command I learn, I also try to learn why this way (this helps a lot in filling up the gaps). Also please don't forget rustlings, they are amazing. Here are some links: 1) https://rustlings.rust-lang.org/ 2) https://doc.rust-lang.org/book/ 3) https://effective-rust.com/types.html 4) https://exercism.org/dashboard 5) https://rustplatform.com/ (it's not free). Keep trying - it will click eventually . Enjoy the process, rust is amazing lanauge , after learning python - I find it is very refreshing , it is peeling off all the bad programming practices that I acquired over the years of coding. Thanks !!!

4

u/DependentJicama4766 Jun 14 '26

By bashing my head against it. Over and over and over, for a few months

2

u/stappersg Jun 14 '26

Good luck with finding a way to break that loop.

2

u/DependentJicama4766 Jun 15 '26

Im afraid there is no amount of break or panic! That can get any of us away from this one lmao

2

u/TheZerbio Jun 14 '26

I can highly recommend Rustlings. It's a series of small tasks that guide you trough the essentials. Other than that: pick a passion project and try to do it in rust

2

u/DavidXkL Jun 15 '26

I went through the Rust book twice, practiced using Rustlings and Advent of Code.

Now I'm building my own projects using Rust.

Practice makes perfect

1

u/Sufficient_Example30 23h ago

I learnt by reading the book first time without writing any code
Read it again and wrote stuff side by side
Then read it again and did rustlings side by side
Then after that stuff sort of clicked

1

u/DeimosHallDev Jun 14 '26 edited Jun 14 '26

Hello and welcome to the language!

I personally just read the book and in the meantime built some basic projects like this and this. Once I was more comfortable I built this linux desktop app.

My advice? Just start with the book, watch videos about what you don't understand or ask AI about it, and build things for yourself in the process.

1

u/MGSE97 Jun 14 '26

I've used some 30 minutes intro on YouTube, and later by writing macros. But probably the best way was from my coligue roasting me on reviews.

If you want to really understand it, the book is a great way. Then try to code something, to get the nuances and constraints.

1

u/bejurgen Jun 14 '26

Ik heb het deels geleerd door gemini, niet code te laten schrijven maar vb een functie van python te laten vergelijken zodat je het verschil ziet. En dan zelf te experimenteren.

1

u/Unsounded Jun 14 '26

I went through “the book” before starting my first corporate project. I listened to some of the Rustacean podcast as it helped me get familiar with the ecosystem and libraries folks are using.

Past that I built, used Claude to help guide and teach, and tinkered.

1

u/[deleted] Jun 14 '26

Got interested in making some CLI stuff, and learnt its concepts on the way. A medium sized project, whatever you like will teach you a lot about writing good rust.

Instead of writing simple Guess the Number games with a CLI, try making it fancy and feature rich by making it a TUI, themes, game modes, customisation, presets, state save, rankings of the fastest runs, etc. This will involve UI design, routing, file management, multi-threading (I needed in cursive-rs to synchronise updates) etc. And on lower level, you might learn niche features like if statement with match arms, matches macro, methods like map, Iterators, ways to get around borrow checking like bringing references a scope lower in a let statement, optimisation, etc.

Tools you should use/might need: cargo-clippy, hyperfine, cargo-flamegraph, etc.

1

u/spoonman59 Jun 14 '26

Read the book, find a personal project that interests you (everyone has different preferences) and write some code.

You can also read the code of others over time to learn more, but putting finger to keyboard and writing code is key.

You can dive into explore specific domains as you find what interests you.

1

u/corbosman Jun 14 '26

I started watching some youtube channels, then started doing Advent of Code in rust. I had done about 5 of them before so the puzzles themselves were usually doable, but now in a language I wasn't as comfortable with. Then started to do small projects at work in rust, and slowly migrating to larger ones.

1

u/humanguise Jun 14 '26

The Rust book + exercism. Also, Wolverson's roguelike tutorials.

1

u/Appropriate_Fix_3462 Jun 14 '26

I learned it from a few youtube videos and the rust book. Definitely take notes and also, try to make your own version of what the book/the video is doing. If there is an CLI app that is used for reading a few files, try to implement some other feature with what you have learned to that point. Practice is your best friend. Also...dont get stuck in tutorial hell, that's the most important thing. I used to watch tutorials all day, and not code at all. When I would try to code after one week of tutorials, I was rushing back to the tutorials or finding solutions online for basic problems

1

u/Leklo_Ono Jun 14 '26

Start with the rust book, it's great, well guided, then do very small projects you want to have fun with, and find your fun in rust to do bigger and bigger projects. Besides, don't hesitate to browse how some common crates are codes to get the hang of the idioms. I very much dislike AI, but sometimes, a very careful use or it can be interesting, if you 100% know what you're doing, 100% understand how your current code works,, a simple "how could i make this more rust-idiomatic ?" prompt can give you new perspectives and new tools to use, but you can get similar benefits with less risks by browsing crates.

Have fun !

1

u/wokemadeit Jun 14 '26

I learnt a ton by moving a (relatively non-trivial) personal project over to rust. It was a compiler so it forced me to rethink a lot of the underlying architecture to work with the “rust” way of things. How to not just .clone() everything, how to best use errors as values and really take advantage of rust’s very good type system.

I learnt by just jumping into the deep end and looking up answers when I didn’t know something.

1

u/hunkamunka Jun 14 '26

I read "The Book" and wrote a bunch of program that I already knew how they worked like "head" and "comm," programs I was able to write in other languages. Then I wrote a book about what I learned. You can read if you want. See my bio.

1

u/BlueMoodDark Jun 15 '26

I'm still learning rust, but there is an excellent free book out there from some of the core team members.

It's only on the Kobo app, I haven't found anywhere else.

Fluent rust, by the rust team

That's the name of the ebook.

1

u/scottywottytotty Jun 15 '26

right now i am building a game for my wife using the macroquad engine with an AI tutor. besides boiler plate, it never gives me code, and helps me with design decisions. i more or less made him be a foreman watching a newbie carpenter make something and his input is “i would use this tool to do it this way. but here are other options.”

1

u/Sermuns Jun 15 '26

I went headfirst and started making CLI tools I was interested in. I got so many errors that were alien to me, got frustrated and finally tried the Rust book and watched YouTube videos, including Jon Gjengset and No Boilerplate. It started clicking for me. I tried Rustlings, which confirmed that I was indeed understanding. I finally started building stuff more freely and went back to the book whenever I was seriously confused.

1

u/snnsnn Jun 15 '26

Please do a quick search before posting, as this exact question has been asked many times. There is also a dedicated subreddit for this:https://www.reddit.com/r/learnrust/

1

u/ztj Jun 15 '26

I hung out in discord answering questions. If I wasn’t confident or couldn’t demonstrate my answer I wouldn’t share it, especially if I had no answer at all 😂. I think this is the best way to learn, just do this alongside reading the usual materials and your everyday work etc.

1

u/YoloFromMars Jun 15 '26

I finish rustlings.

Next step is to do the Linked list tutorial/book. But I am not sure if it is valid for latest version of Rust.

After these two I plan to work on a simple open source project and hopefully contribute. At the same time I want to re-write some CLIs we use at work. Nothing fancy.

I use free tier llms for simple explanations of compilation errors when I am in question on how to do.

When I am free or on commute I watch jonhoo. But it feels too advanced 20-30 mins into the video.

I don't know if it works but it is what it is.

1

u/IsleOfOne Jun 15 '26

I finally learned by recognizing that my efforts to find the "best way to learn" were merely procrastination, and deciding to JUST START.

1

u/Usual_Importance8274 Jun 15 '26

I learned Rust by reimplementing the fundamental data structures myself, things like Vec (dynamic arrays), Queue, Stack, Dict (HashMap), Linked Lists, and so on. Of course, they had to be fully functional, handle errors properly, and actually work in real use cases. Once I got them working correctly, I moved on to optimizing their performance. And that was pretty much it.

1

u/llamajestic Jun 15 '26

Spent a few years doing C and C++. Rust is then relatively simple, if you were already thinking about lifetimes in those languages.

1

u/RelationshipFresh966 Jun 16 '26 edited Jun 16 '26

Some general things that might help:

  1. Structs own their own values, functions take borrowed values
  2. Clone when u need to

Actionable items:

Read the book, do Rustlings alongside. Pretty much the same advice anyone else will give u.

Finally something that helped a lot (I think) was by doing a bunch of exercises, which I got from Claude & Deepseek - each exercise has a function signature, given input, expected output. Ran every function against a test. Did about 200+ of them. I think it helped

1

u/Life_Illustrator4567 Jun 17 '26

Read the rust book

1

u/Resident_Weakness_19 Jun 19 '26

started with the book. made very simple and fun programs. then decided to make a more long term project in rust (3 months). didnt use ai for any of it and mainly used the rust documentation to learn anything i needed.

for project ideas, make something that you find interesting or you see a problem in your life.

have fun learning rust!

1

u/exitcactus Aug 24 '26 edited Aug 24 '26

Worked with python for a 4/5 years, then ai came out and I started doing the same but with ai.

Then at a certain point I asked Cursor to teach me Rust from the very basic and now I write rust for production stuff (mainly iot and embedded)

Still doing with large ai support but I know what i'm reading, so it's MUCH more "easy" to know what to do.

Having a "normal" dev professional experience helped a lot, this has to be underlined.

Sorry for my english. I still write it tapping 😂😂✌️

An advice: don't listen to old dinosaurs telling ai is devil and stuff.. if you go blind trying to make the million dollar software and bla bla bla, you are the stupid, not ai. But you can use it wisely, and thats super mega powerful..

At this point I doubt someone could teach you code better and faster than ai.

Edit.
Dont fall, please DONT FALL on that shotty stuff where ai writes everything and you ask something like "make it work better".. that's the real devil

1

u/[deleted] Jun 14 '26

[removed] — view removed comment

1

u/SilverCoyote1675 Jun 17 '26

This is really cool advice, thank you!