6 free resources to learn Rust for beginners.
A list of resources that I am using to learn Rust. It includes videos, the official docs and blog posts. These resources complement each other, covering different learning styles and approaches to the language.
I consider them to be beginners friendly and able to facilitate the learning in small chunks at the time.
There is more than one way to learn the process of
chewing glass with Rust, and we all have preferences.
This list is not exhaustive, maybe it is biased. I will be updating it to include new findings and your recommendations.
Rust is a modern system language that prioritizes safety, speed and concurrency. It is possible because Rust is memory safe without using garbage collection.
The downside is that the enforcing rules and principles of Rust make your code complex and difficult to reason at times. With Rust you are responsible for your code at a low level of abstraction (calm down, you don't have to write machine code), thinking about the stack and the heap becomes more common. Thankfully when your program panics (throws error, stops execution), it is done in a structured way, with the compiler helping you in each step of the way.
Coding with Rust would feel more complex if your background is not in a system programming language. But it is not an impossible task, it just needs dedication and practice. Coding is “learned with your fingers” and that takes some time.
Rust is used to build many types of software, including blockchains, so its transferable skills are guaranteed.
If you are getting into the world of Web3, DeFi and blockchain, then you probably know already that Rust is used to code with Solana and Polkadot. You can do a lot with high level libraries in Solana with your language of choice but at some point you may need to create your custom smart contracts and for that you have Rust.
I wrote an article that contains more information about Rust development environment, salaries, industries, etc., and a comparison of Rust and Solidity for developing smart contracts.
I have been compiling these resources as part of my learning of Rust, resulting in this post, so I don't have to look for them in each browser bookmark, device or app.
Hope it may be useful for you also.
The Rust language official documentation
The official Rust documentation is the best that you can get. It includes the book, a collection of workable examples and 'rustlings'.
The Rust Programming Language book
In its 21 chapters and appendices, The Rust Programming Language book, covers the in and out of the language.
The good part is that it gets deep explaining the language, the not so good part is that it requires more time to read it.
Tip: You can just jump to a specific chapter or search for a term.
Rust by Example
Rust by Example is a collection of runnable examples created to help with the understanding of
various Rust concepts and standard libraries.
It is a good resource if your learning style is potentiated by concrete examples that break down abstractions and concepts.
More code, less words.
rustlings course is similar to Rust by Example, it is composed of
small exercises to get you used to reading and writing Rust code, and understanding Rust errors.
It guides you from the Rust toolchain installation to the code execution using the command line.
In each exercise you basically have to "fix" something that is stopping the program from running (compiling). Each topic is accompanied by a README with explanations relevant to its exercises.
The exercises are organized in a way that is "recommended" to beginners in Rust. You can also jump to anyone in particular.
Kind of a game with progressing levels.
Rust for Beginners series (Video)
Rust for Begginers gives a simple introduction to Rust. I think that it complements very well with Rust by Example.
It covers Rust tools, variables, scalars data types, compound data types, functions, structs, enums, if/else and match, loops, error handling, ownership, borrowing, strings, collections, and traits.
Each episode is short and concise. The series amount to ~1 hour and 48 minutes.
A Gentle Introduction To Rust (Post)
A Gentle Introduction To Rust works toward giving you
enough Rust to fully appreciate the excellent learning resources available online and
enough feeling for the power of the language before getting deeper.
The novelty and mental model of Rust is presented with examples that start with a problem and walk you how to solve it.
It is split in 10 parts that cover: basics; structs, enums and matching; filesystem and processes; modules and cargo; standard library containers; error handling; threads, networking and sharing; object-oriented programming; parsing with Nom; and pain points.
CosmWasm Smart Contracts course (Video)
The CosmWasm Smart Contracts free course has a module where it explains different aspects of Rust: mutability, ownership, borrowing, lifetimes, traits, etc.
The Rust videos have a total duration of 1 hour and 52 minutes, plus additional lab assignments and other materials.
You can even complete the course and create your smart contract for blockchains that use CosmWasm. It is a way to multi-chain smart contracts and the Cosmos ecosystem.
This list is not the end, it is just a guide to keep my focus while learning Rust. I know that it is a process, that takes time, that I will have to come back many times for it.
So let it rest assured that it is a beginning, houseligth for storming times, bandaids for the
glass to chew.
I will come back thankfully and hope you too.
One line of code at the time YAGMI.