Hi folks, I am from .NET background and just started to dive in Rust world, I've almost refined the unique fundamentals (though I have some unclosed gaps)
from Rust Book and almost solved most of the Rustlings quizzes.
What is your advice for me to get more advanced with rust on backend / infrastructure development ??
IMO, the best way to learn something is try to use it. Try to use your skills and write something small but useful for yourself in Rust. No doubt you'll have to find some crates, get familiar with them, fight with some concepts, probably look how other folks solve similar problems. I think that's the best way to continue learning Rust and find real gaps in your knowledge.
Thanks for the advice ![]()
Mastery, you seek. Practice, you must.
Aside this jest, I can highly recommend video series Crust of Rust by Jon Gjengset. Jon tackles here intermediate level Rust concepts. I started watching it after reading The Book, and it was very good natural follow-up.
To extend on the "find something useful-ish to do and do it" answers... If you're looking for backend/infra ideas then you will likely want opportunities to master multi-threading, async and CLI. Here are a few pointers...
- for CLI:
- start by not using
clapfor 24 hours, then bring it in to your crate. - aim to split absolutely all logic into a lib and keep your binary to the interface implementation and library calls
- focus on idiomatic error handling throughout the lib (bubble up) & app (final handling)
- beware calls to
std::process::exit- it's not safe in any RAII context (see therantexplanation in the readme forexit_safely - add
tracingfor observability
- start by not using
- for async:
- start by manually creating
Futures before you useasync fn&async blockfor anonymous ones (or as soon as you have almost enough of a grasp of anonymous async to think about moving on to the next bullet) - see the stdlib docs for details - start with the
futuresruntime & suportingfutures-xxxcrates most of which are from rust-lang. Only move totokioonce you understand the value of what it brings and need the extras. (Filling any gaps in the futures-xxx ecosystem is a great way to mastery - my experience creatingfutures-udpwas probably the most valuable learning I did around async) - consider creating your own async runtime (this was a tip I recently heard on "let's get rusty" and want to try at some point - this will give you an even better understanding of the state-machines and memory-safety that's going on under the hood with
Futures and form a great bridge into multi-threading
- start by manually creating
- for multi-threading
If you want to dive into multithreading, atomics and locks from scratch: Rust Atomics and Locks by Mara Bos
This book has small projects too, so you get to learn new things by hand rolling some of the sync primitives yourself : )
You have a very good grasp of the previous language, but Rust significantly changes the way you think when programming, as it incorporates concepts and programming approaches that are not used or do not exist in other languages, such as memory management, concurrency and other aspects that alter the way tasks are carried out.
For me, the best way is to read, practise and make mistakes – we don’t like mistakes, but they actually help us learn a great deal. Working on projects is also useful, as it leads you to explore topics you’ll need to use, such as concurrency, memory management, closures, how to set up a server, crates and other topics.
This community is very collaborative; it helps you see a different perspective on the same topic, and people here are very supportive of beginners or those new to the language.