r/learnrust • u/Creative_Concert8682 • 17d ago
best way to learn rust?
hi. i develop using cpp. i want to learn rust to see what the hype is all about and build some systems (core) in rust. what's the best way to learn rust with my bg in cpp? should i learn it from scratch or learn by mapping it to cpp?
20
Upvotes
4
u/No_Cartographer1492 17d ago
I'm having fun with "Too Many Linked Lists" https://rust-unofficial.github.io/too-many-lists/
7
u/Any_Commercial_6764 17d ago edited 16d ago
Skim/read the Rust book: https://doc.rust-lang.org/book/
As you go along you can try and look at some simple programs on github or tutorials to get a feel for the syntax.
Rust is different than cpp, I’d treat them as such. Every language has high level constructs such as conditionals and iteration; map programming languages at that level rather than trying to connect cpp to everything. Rust also is just pretty unique.
Do a simple project or two and you’ll have most of the core syntax down.
1
u/burntoutdev8291 14d ago
Microsoft has a rust training guide that teaches people the transition from another language. It's something i would've liked in addition to the rust book
3
u/DavidXkL 17d ago
Start with the rust book.
Then do some practice with Rustlings, Advent of Code.
Then rewrite your old projects in Rust
2
u/sunilmourya 17d ago
This is good repo, if you are coming from C++ background https://github.com/microsoft/RustTraining
1
u/alpha1beta 16d ago
I'm learning Rust, but I've taught SQL, PHP and general website building. I always encourage people to build what they know - it might be an IMDB clone, or a blogging platform, or a Twitter clone, or a video game library app. Doesn't matter. Build something you understand and love, so when it comes time to structure your data and write code, especially that around inputs, output and database code, you'll understand your goal.
Building a airline reservation system, or any other textbook examples isn't gonna resonate with everyone.
1
u/KGVTEJA 6d ago
there are so many books what books should i follow in order ?
1
u/Acrobatic_Cook_1777 5d ago
https://rustarena.app/ 🙂
0
u/just-kenny 17d ago
I did peijexts, and then I joined a startup thst used it in production exclusively....really taught me a lot