10 Best Free Rust Courses for 2024: Write Memory-Safe Code
Speed without compromise: Join the fastest-growing language community in building robust and efficient software with these FREE online courses.
What if I told you that one man’s frustration with an elevator breakdown led to the creation of the fastest-growing and most-beloved programming languages today?
Seventeen years ago, Graydon Hoare’s ordinary evening turned pivotal when an out-of-order elevator at his apartment building forced him to trek up 21 stories. A Mozilla software engineer, Hoare’s frustration wasn’t just with the climb, but with the fact that the tools of his trade couldn’t even make an elevator that works without crashing. He knew these crashes were often caused by memory errors, notoriously common mistakes to make in programming languages like C and C++. Hoare wondered if it was possible to write small, fast code without memory bugs.
Most people would stop here, shrugging off the incident as just another annoyance of modern life. But Hoare decided to do something about it. 21 flights of stairs later, Hoare reached his apartment, pulled out his laptop, and began theorizing how such a fantastical language could exist. He named this hobby project Rust.
Fast forward to today, and Rust is not just one programmer’s daydream but a robust reality, adored by millions of developers and supported by tech behemoths like Amazon, Google, Meta, and Microsoft. As the fastest-growing language this year and the last, and most-beloved language for eight years in a row, the message is clear: Rust is here to stay and will become even more relevant in the years to come.
Want to future-proof your career? Explore a new approach to programming? Or just see what the hype is all about? Whether you’re a new or experienced programmer, a visual learner or auditory learner, this Best Courses Guide (BCG) will help you choose the right course for you.
Click on the shortcuts for more details:
- Top Picks
- What is Rust?
- BCG Stats
- Notable Rust YouTubers to Follow
- Additional Rust Resources
- BCG Methodology
Top Picks
Course Highlight | Workload |
Best Comprehensive Course for Studious Beginners (Rust Foundation) | N/A |
Best Easy-to-Digest Course for Beginners (freeCodeCamp) | 14 hours |
Best Introductory Course for the Curious (Linux Foundation) | 1–2 hours |
Best University-Level Course for Beginners (Duke University) | 36 hours |
Best Course for Android and Embedded Programming (Google) | 3 days |
Best Bite-Sized Course for Beginners (Microsoft) | 5–6 hours |
Best Course for Web Development (Jeremy Chone) | 1–2 hours |
Best Course for Python Programmers (Michael Kefeder) | 14 hours |
Best Course for Practicing Rust (Exercism) | N/A |
Best Course for WebAssembly (Linux Foundation) | 7–14 hours |
What is Rust?
Rust is a multi-paradigm, general-purpose programming language that runs blazingly fast, emphasizing performance, type safety, and concurrency. Contrary to popular belief (or at least mine), Rust is not named after the oxidation of iron, but rather a group of resilient fungi that: “are over-engineered for survival”.
And what an apt description that is — when Rust code compiles, the compiler guarantees that there are no segmentation faults, no buffer overflows, no memory leaks, and other common memory errors in your application. Your code will live long and never crash.
This is achieved through its unique ownership system, which manages memory through a set of rules enforced at compile-time, rather than runtime. This system ensures that memory errors, which are a leading cause of software vulnerabilities, are minimized. In fact, Microsoft reported that 70% of their security bugs were memory safety issues. And it is for this reason that Microsoft has dubbed Rust “the Industry’s Best Chance at Safe Systems Programming”, and has started developing Windows drivers in it.
Rust has learned the lessons of older languages. It takes inspiration from both Object-Oriented Programming and Functional Programming paradigms, incorporating what works and what doesn’t. As a result, Rust offers a way of programming that is neither purely functional nor overly object-oriented: it’s a unique blend of styles.
Does the prospect of having to change your mindset around writing code scare you? Not to worry — the language is designed to encourage writing clean, maintainable code. The compiler, known for its helpful error messages, serves as a guide, teaching you to write better Rust code as you go. Say goodbye to arcane error codes.
And with many other quality-of-life features like zero-cost abstractions, threads without data races, trait-based generics, pattern matching, and type inference, these features combine to make Rust not just safe, but also enjoyable and efficient to use. Its applications are wide: from CLI tools, to networking, to embedded services, and the most exciting, WebAssembly.
BCG Stats
- All of the courses are free or free-to-audit.
- There aren’t any Rust courses in this BCG aimed towards absolute beginners to programming, but it’s not impossible to learn from scratch.
- About 1.3K people follow the Rust subject on Class Central.
Best Comprehensive Course for Studious Beginners (Rust Foundation)
Produced and maintained by the Rust Foundation, these three resources are considered the standard path to learning and mastering Rust by the community: The Rust Book provides comprehensive theoretical knowledge, Rustlings offers practical exercises for reinforcement, and Rust by Example showcases real-world code scenarios.
This is the path I trekked to learn Rust, so I can heartily recommend these resources to both new and experienced programmers. However, all three resources assume prior programming experience and are heavily text-based, so it might not be suitable for everyone.
The Rust Book
Often considered the bible for Rustaceans (Rust enthusiasts), this book provides a comprehensive overview of the language, from its basic principles such as ownership to advanced features like code interoperability and threading. It’s a must-read for anyone serious about understanding Rust deeply and thoroughly.
I recommend that you read Brown University’s version of the Rust Book, as it contains many helpful features including interactive code snippets, quizzes, and visualizations. Additionally, you might find this video walkthrough of the book helpful as the book is quite dense, though it is slightly outdated.
Rustlings
Learning a new language is as much about practice as it is about theory, which is why Rustlings was made.
Rustlings offers a series of bite-sized exercises and quizzes to help you reinforce the concepts you learn from The Rust Book through hands-on experience. There are hints for each exercise, and you’ll code in the blanks to pass the automated tests.
You can take this course in the browser, by cloning it to your PC, or by following a walkthrough. But the best way to learn in my opinion is through JetBrain’s adaptation of the course, as it makes the process of learning seamless.
How Rustlings and The Rust Book chapters synthesize with each other. Taken from the Youtube Channel No Boilerplate’s video, How to Learn Rust
Rust by Example
Rust By Example is the most stand-alone resource among the three. It provides practical, real-world examples of Rust code that can be run in the browser, with little commentary and fuss.
Experienced programmers can forgo the Rust Book in favor of Rust by Example + Rustlings if reading hundreds of pages about a language isn’t their style. Otherwise, this resource will help new programmers ground themselves by seeing practical applications of Rust.
Institution | Rust Foundation |
Level | Beginner–Intermediate |
Workload | N/A |
Cost | Free |
Exercises | Yes |
Certificate | None |
Best Easy-to-Digest Course for Beginners (freeCodeCamp)
If you aren’t the type of person who can digest long paragraphs of text from textbooks or skim through and understand hundreds of code examples, then fret not — Arfan Zubi’s free course is for you.
This freeCodeCamp course is almost as comprehensive as the official Rust Book, covering basic syntax and data types to advanced topics like lifetimes and closures. It makes up for its slightly less breadth of topics with greater depth in the topics presented. You won’t only learn how to abide by the rules, you’ll also learn why the rules exist, especially when it comes to ownership and borrowing.
By the end of this course, you’ll master the Rust standard library and all the hyped-up language features Rust has to offer (like pattern-matching, generics, traits) as well as the Rust toolchain such as cargo and crates.
Provider | YouTube |
Instructor | Arfan Zubi |
Level | Beginner |
Workload | 14 hours |
Views | 310K |
Likes | 8.6K |
Cost | Free |
Exercises | Yes |
Certificate | None |
Best Introductory Course for the Curious (Linux Foundation)
Wonder what’s the fuss with Rust? The Linux Foundation sure does!
A free course created by one of the major adopters of Rust, Getting Started with Rust (LFEL1002) is designed to help curious programmers understand why Rust is seeing more and more use in major codebases around the world in under 2 hours.
While the course may not be as comprehensive as others, it will bring you up to speed, better preparing you to write high-performance minimal-error code for a variety of applications. Thus if you’re someone who wonders why you should learn Rust in addition to C or other legacy programming languages, this course is perfect for you.
The text-based course does this through a “show, don’t tell” approach. It covers the basic syntax of Rust, ways to fix and improve Rust code, and the Rust toolchain. Learners will write a simple program in Rust and use Cargo to build and manage their Rust program in a lab by the end of the course.
Institution | Linux Foundation |
Instructor | Tim Serewicz |
Level | Beginner |
Workload | 1–2 hours |
Cost | Free |
Exercises | Lab |
Certificate | None |
Best University-Level Course for Beginners (Duke University)
Duke University’s Rust Fundamentals welcomes learners of all levels, from the programming newbie to the pro.
Through bite-sized lectures and code demonstrations, you’ll gain a solid foundation in Rust programming and develop proficiency in advanced concepts. By completing this course, you’ll have the skills to develop reliable and high-performance applications, regardless of your prior programming experience.
Just a heads-up, this course makes great use of VSCode and GitHub CoPilot. If you’d prefer not to use these tools, then this course may not be for you.
This free-to-audit course is particularly generous to auditors. You’ll have access to all course materials, including graded quizzes and (ungraded) external labs, with the exception of internal labs.
After installing Rust and setting up your Codespaces development environment, the topics the course will go into are:
- Control Flow and Error Handling: Understanding conditional statements, loops (while, for), break/continue statements, match control flow, and handling errors effectively in Rust.
- Functions in Rust: Learning about unit functions, return values, argument usage, and the concept of borrowing.
- Data Structures – Structs and Instances: Defining structs, creating instances, and utilizing associated functions. Additionally, using strings, vectors, and enums.
- Code Organization: Mastering the use of public and private modules, and managing public and private fields.
- Testing and Documentation: Developing skills in organizing test files, writing and testing code (including private code), utilizing test failure messages, and documenting code effectively.
Institution | Duke University |
Provider | Coursera |
Instructors | Noah Gift and Alfredo Deza |
Level | Beginner |
Workload | 36 hours |
Cost | Free-to-Audit |
Exercises | Quizzes and Labs, limited access |
Certificate | Paid |
Best Course for Android and Embedded Programming (Google)
Coming from an Android or Embedded Systems background?
A free course made by a major Rust adopter, Comprehensive Rust 🦀 is used at Google to teach experienced software engineers with experience in C++ or Java, though any dynamically typed language is fine too (and yes, the course title has a 🦀) .
The course style of teaching heavily relies on independent learning. You’ll first start with theory, followed by running interactive code examples with commentary, and then handing out exercises with solutions.
As for what you’ll learn, there are 3 core modules each a day long:
- Day 1: Basic Rust, syntax, control flow, creating and consuming values.
- Day 2: Memory management, ownership, compound data types, and the standard library.
- Day 3: Generics, traits, error handling, testing, and unsafe Rust.
Meanwhile, the three optional modules touch on practical applications:
- Android: a half-day course on using Rust for Android platform development (AOSP). This includes interoperability with C, C++, and Java.
- Bare-Metal: a whole-day class on using Rust for bare-metal (embedded) development. Both microcontrollers and application processors are covered.
- Concurrency: a whole-day class covering both classical concurrency (preemptively scheduling using threads and mutexes) and async/await concurrency (cooperative multitasking using futures).
Institution | |
Provider | GitHub Pages |
Instructor | Martin Geisler |
Level | Intermediate |
Workload | 3 + 3 days |
Forks | 1.3K |
Stars | 22.3K |
Cost | Free |
Exercises | Yes |
Certificate | None |
Best Bite-Sized Course for Beginners (Microsoft)
In an effort to speed up Rust adoption, Microsoft released this free Rust learning path, Take your first steps with Rust. For beginner programmers who would like to have a feel of the language through 11 bite-sized modules and lots of interactive online exercises, this course is for you.
The journey begins with an overview of Rust’s unique features and its awesome development environment (thanks to Cargo). After learning the core programming concepts like control structures and what not, you’ll take a look at Rust’s algebraic data types through data structures like arrays, vectors, and hash maps. You’ll then explore Rust’s distinctive approaches to error handling using enums and managing memory through ownership, borrowing, and references.
The course also delves into advanced topics like generic types and traits, code organization using modules and packages, and utilizing third-party packages called crates. Not only that, you’ll also tackle the oh-so-tiring issue of tests, and amaze yourself at how easy it is to write one in Rust. No more putting it off!
By the end of the course, you’ll have developed a simple but practical to-do list manager in the command line.
Institution | Microsoft |
Provider | Microsoft Learn |
Level | Beginner |
Workload | 5–6 hours |
Cost | Free |
Exercises | Yes |
Certificate | Free Badge |
Best Course for Web Development (Jeremy Chone)
Though Rust web frameworks are still nascent, some of them are already ready to be used in production. Meet Axum — a web application framework that focuses on ergonomics and modularity.
In this free course, Jeremy Chone guides you through the process of setting up and configuring a web server using Rust and Axum. Beginning with a basic “Hello World” router, Chone progressively covers essential topics, such as simulating a model for CRUD operations, before culminating with things you’ll see in production like logging and debugging.
If you already have some Rust experience under your belt, you’ll be sure to find this course engaging and insightful.
Course highlights include:
- Web Server Development: Learn to set up and configure a web server using Rust and Axum.
- Routing and Request Handling: Master the art of implementing various routes and managing HTTP requests.
- Middleware and Error Handling: Discover how to integrate middleware for essential functions such as logging and tailored error management.
- API Development: Dive into building a login API, encompassing JSON payload management and authentication logic.
- Cookies and Session Management: Explore effective techniques for cookie handling and user session management.
- Client and Server Errors: Learn to distinguish and adeptly manage client and server errors.
- Logging and Debugging: Gain insights into logging and debugging methods, with a focus on implementing request logging in Axum.
Jeremy Chone actively participates in the course’s comment section, answering learners’ questions, so make sure to thank him for the course. Chone also offers a follow-up tutorial, where he develops a real-world production application.
Provider | YouTube |
Instructor | Jeremy Chone |
Level | Intermediate |
Workload | 1–2 hours |
Views | 85K |
Likes | 2.3K |
Cost | Free |
Exercises | Demo |
Certificate | None |
Best Course for Python Programmers (Michael Kefeder)
The Snake meets the Crab in this free and insightful YouTube course by Michael Kefeder.
This course is perfect if you already know Python and want to descend into the world of low-level programming.
In From Python to Rust, you’ll start by understanding why and when to use Rust instead of Python. The course covers basic programming topics like handling data and writing simple instructions, and introduces you to Rust’s tools and helpful add-ons. You’ll learn about organizing data, writing reusable code blocks (functions), and special features in Rust not found in Python.
The course also teaches you how to find and fix errors, and how to use Rust for tasks commonly done in Python, like running several processes at once or managing time-delayed tasks. Plus, you’ll get to know how Rust can work with Python, which is really useful. Towards the end, the course goes into creating web-related projects and some advanced topics like handling graphics and databases.
Channel | Bedroom Builds |
Provider | YouTube |
Instructor | Michael Kefeder |
Level | Beginner |
Workload | 14 hours |
Views | 25K |
Cost | Free |
Exercises | Demos |
Certificate | None |
Best Course for Practicing Rust (Exercism)
Ever sat down to code one day, only to realize that it’s absolute spaghetti? Wouldn’t it be nice to have someone experienced sit down beside you and help you de-spaghettify your code?
That’s exactly what Exercism offers.
Exercism is a free open-source platform whose goal is to help developers become more fluent in a programming language by solving exercises, whether they’re a newbie or a seasoned coder. With more than 90 exercises with community-submitted solutions ranging from the “Hello World!” basics to algorithmic brain-teasers, there’s something for everyone.
Well, all of that is pretty standard stuff for a coding platform. But as I’ve teased at the beginning, Exercism goes further by allowing you to ask experienced Rust programmers to look at your solutions for free. These volunteers take the time to review your solutions, pointing out both the good and the areas needing improvement. I’ve personally used the platform and usually received feedback within a few days, though sometimes it may take a bit longer. It’s a great way to get expert advice without any cost.
Provider | Exercism |
Level | All levels |
Workload | N/A |
Enrollments | 90K |
Cost | Free |
Exercises | 90+ exercises with personal mentoring |
Certificate | None |
Best Course for WebAssembly (Linux Foundation)
Excited for both WebAssembly and Rust? Why not learn both technologies at the same time?
If that sounds overly ambitious, well that’s exactly what The Linux Foundation promises to teach you in their free-to-audit course, WebAssembly Actors: From Cloud to Edge.
This text-based course guides you from the basics of WebAssembly to using open source frameworks and the actor model for building adaptable applications. Ideally, you should have some experience with microservices and have intermediate programming skills in any language or framework before taking this course.
You’ll start with WebAssembly and its use cases, and (painfully) discover first-hand the Assembly in WebAssembly. Then, you’ll adopt the Rust language to avoid writing raw WebAssembly, and inevitably end up building portable, efficient, and secure WebAssembly modules. Finally, you’ll explore the process of building applications that can operate at the edge, in the cloud, on devices, and even in the browser.
Here’s what you’ll learn in each chapter:
- Chapter 1: Creating WebAssembly Modules from Scratch
- Fundamentals of WebAssembly module creation, covering the essential tools, understanding of WebAssembly specifications, and key concepts like types and memory management.
- Creating a Tic-Tac-Toe game in raw WebAssembly.
- Chapter 2: Creating WebAssembly Modules with Rust
- The basics of the Rust programming language.
- Compiling Rust code directly to WebAssembly to produce “standalone” WebAssembly modules.
- Integration of Rust and its unique features in WebAssembly development.
- Creating a Tic-Tac-Toe game in Rust.
- Chapter 3: Using WebAssembly Host Runtimes
- The roles and responsibilities of a host runtime (usually the modern web browser) and cover the use cases for non-browser host runtimes.
- How hosting WebAssembly modules in languages like Rust or Go works.
- Chapter 4: Advanced Guest and Host Communications
- What linear memory is, and how guests and hosts can interact with it to build rich and powerful communication patterns.
- Chapter 5: WebAssembly and the Actor Model
- Exploring the application of the actor model in WebAssembly for concurrent programming, specifically to a cloud native WebAssembly host runtime using the open source project wasmCloud.
- Chapter 6: Advanced Actor and Capability Use Cases
- How, but more importantly, why you might take advantage of actor-to-actor communication in a distributed actor model such as wasmCloud.
As an auditor, you’ll have access to the lab files and thus be able to do the labs. However, knowledge checks and the final exam are off-limits, only available to certificate-takers.
Institution | Linux Foundation |
Provider | edX |
Instructor | Kevin Hoffman |
Level | Intermediate |
Workload | 7–14 hours |
Cost | Free-to-Audit |
Exercises | Labs, Knowledge Checks, Final Exam (limited access) |
Certificate | Paid |
Notable Rust YouTubers to Follow
- No Boilerplate: Still not sure why you’d wanna learn Rust? Just watch one of his videos. He shows how Rust excels over other languages through easy-to-understand examples and demonstrations. In fact, he’s the reason why I got interested in Rust in the first place.
- Let’s Get Rusty: Covers the latest Rust news. Also produces the occasional tutorials.
- Logan Smith: Short tutorials focusing on specific features of Rust to help you become a better programmer.
Additional Rust Resources
- Rust in Motion (paid): From Mannings. Was originally in the 2022 version of this BCG. Good project-based video tutorials on Rust for programmers.
- Rust for Rustaceans (paid): From NoStarch. Dense, in-depth book on Rust for professionals who have mastered the basics. No exercises.
- Zero To Production In Rust (paid): By Luca Palmieri. If you’re interested in Rust for the backend, this hands-on book builds a functional email newsletter API from scratch.
- Programming Rust, 2nd Edition (paid): From O’Reilly. Some say that this book is much easier to follow compared to the Rust Book, while also being more polished. Code examples and exercises are on GitHub.
BCG Methodology
I built this ranking following the now tried-and-tested methodology used in previous Best Courses Guides (you can find them all here). It involves a three-step process:
- Research: I started by leveraging the internet and Class Central’s database with 200K online courses and 200K reviews. Then, I made a preliminary selection of 80+ courses by rating, reviews, and bookmarks.
- Evaluate: I read through reviews on Class Central, Reddit, and course providers to understand what other learners thought about each course and combined it with my own experience as a learner.
- Select: Well-made courses were picked if they presented valuable and engaging content and they have to fit in a set of criteria and be ranked accordingly: comprehensive curriculum, affordability, release date, ratings and enrollments.