I recommend starting with the developer documentation so you can understand the language before anything else. This is normally what I do when starting to learn programming languages, especially when languages first come out.
Learn Rust https://www.rust-lang.org/learn
Learn ARM Assembly https://developer.arm.com/documentation/dui0473/m/writing-ar...
Learn Go https://golang.org/doc/
Learn x86_64 Assembly https://software.intel.com/content/www/us/en/develop/article...
2. Write 1 or more serious rust projects of your own choosing. Aim for projects that’ll be thousands of lines of code.
3. Read “Programming Rust”[1]
4. Write more projects
This is what I did anyway.
The Rust discord has a beginners channel which is invaluable for asking questions when you get stuck.
0: https://doc.rust-lang.org/book/
1: https://www.oreilly.com/library/view/programming-rust-2nd/97...
If not, then just write Rust. Remember: no matter how bad or non-idiomatic the code you write, it's still better than not doing it.
If you don't have a project you'd like to do, you can port something to Rust. I think a thousand lines is terrific advice. Writing Rust really helped me solidly remember many "how do i do X in rust" things. Crib liberally from other codebases. Ripgrep is perfect for getting inspired with Rust idioms, such a good codebase (obviously don't port that :D).
I'm at 15k lines now. It gets better! You'll learn to appreciate cargo and the build system. It just works. No more makefiles, pom.xml, requirements.txt. Rust-analyzer is great for IDE hints in a lot of IDEs, but easiest to set up in VSCode. If you end up shipping a CLI program/giving it to friends, you'll appreciate zero-dependency binaries (well, except some libc dep).
If all those things don't matter to you, then re-evaluate. Programming languages are a tool; nothing more and nothing less. What are you trying to achieve? Honestly, you might be better off spending your time on focussing on your career, no matter what the language. You don't say why you want to learn Rust, so I'm not going to guess. But you don't need to know Rust to be a good programmer. Rust will be there in a few years, too.
Learning Rust afterwards is good, too, because you might understand how to write good, safe code already, making the safeties Rust provides more useful.
Here are a couple of links that I have used:
https://fasterthanli.me/articles/a-half-hour-to-learn-rust
https://github.com/Dhghomon/easy_rust
I’m using http://repl.it to learn in the browser.
My GitHub repo, which will hopefully expand over the next couple of weeks:
I can see C++ developers migrating as the philosophy of C++ seems to be more aligned with Rust than C (C solves problems by forcing you to write more C, C++ solves problems by adding more language features).
I’m not sure whether I would enjoy using Rust as I dislike the verbosity of C++ with its more complicated syntax and multitude of “features”.
1. Identify a few projects you'd like to implement (toy ones if you want, or applications that exist in languages you already know well; or try to implement the Advent of Code problems: https://adventofcode.com/).
2. Organize them by your perceived difficulty of implementation (Advent of Code is already kinda organized in increasing order of difficulty).
3. Do your best to implement each project, experimenting with different approaches to architecture, testing, etc.
Having experience in many other programming languages, there are honestly so many different ways to architect and implement a Rust program compared to other languages (especially if you compare to a language like Go). Also, getting the hang of composition (with or without traits), when you come from other languages, is quite challenging.
The whole async/await thing is another story entirely. I currently do full-time Rust development and, tbh, I'm not totally convinced that async/await is always better in all situations. I started toying with Rust back in 2018 and have been doing full-time dev for a few months, and I'm still continuously learning new things.
The great thing about Rust is that it gives you so many options.
The terrible thing about Rust is that it gives you so many options :-)
I highly recommend burntsushi’s solutions. They were closer to what I was aiming for: readable & maintainable idiomatic rust.
Rust has patterns that are very different from any other language I know of. This is why it comes across as an extremely difficult language. I would say however that C comes very close to having similar patterns (if you have discipline!) partially due to lack of OOP.
I'd also say that Rust is a poor language to learn multi-threaded programming. You absolutely won't appreciate Rust until you work in a language with no safety & learn the rationale yourself.
C programmers see references as pointers, and then tangle themselves into borrow checking hell, because they try to avoid copying, but actually avoid owning.
(asking to understand and not troll)
Once you get the fundamentals of Rust down, I recommend writing something multi-threaded. It's not that much harder than writing single threaded Rust and a good test of knowledge; in my case I wrote a tiny web app: