We may earn an affiliate commission when you visit our partners.
Course image
Nathan Stocks

Join Nathan Stocks for a fast-paced, entertaining, and curiously informative hands-on crash course in the Rust programming language.

This course will provide you with the fundamentals you need to boost you up Rust's steep learning curve.  This is a hands-on course with targeted exercises for each subject and projects for you to use your combined knowledge.  From using cargo to creating a project, to writing your code, to compiling and running it, this course has everything you need to get started. This course is kept up-to-date when Rust is updated with new features or major editions.

Read more

Join Nathan Stocks for a fast-paced, entertaining, and curiously informative hands-on crash course in the Rust programming language.

This course will provide you with the fundamentals you need to boost you up Rust's steep learning curve.  This is a hands-on course with targeted exercises for each subject and projects for you to use your combined knowledge.  From using cargo to creating a project, to writing your code, to compiling and running it, this course has everything you need to get started. This course is kept up-to-date when Rust is updated with new features or major editions.

Rust is a systems programming language that eliminates entire classes of bugs and security vulnerabilities, has zero-cost abstractions like C and C++, is fun to program in, and lets systems programmers have nice things. No wonder Rust is gaining traction in spaces as diverse as game engines, high-performance computing, embedded devices, and web programming. Learn how to write high-performance code without the worry of crashes or security vulnerabilities. Join a vibrant community of developers where diversity, inclusion, and just plain being nice are all first-class objectives.

This course is the first in the Ultimate Rust series. If you like this course, then you'll love Ultimate Rust 2: Intermediate Concepts afterwards.

Enroll now

What's inside

Learning objectives

  • Rust language basics, tooling, and ecosystem
  • Fundamentals such as variables, scope, functions, modules, scalar & compound types, control flow, strings, structs, traits, enums, and more.
  • Fun tips & tricks for using rust and systems programming in general
  • Concepts essential to understanding rust such as ownership, references & borrowing, the memory model, and why rust focuses on safety, concurrency, and speed.

Syllabus

Introduction

Introduce myself and Rust!

In this video:

  • Understand why Rust is such an awesome language

  • Know the goals of Rust

  • Learn where Rust came from

Read more

Show how to find the repository containing the exercises and how to get started.

Give a rundown of Cargo and how to use it.

In this video:

  • Learn what Cargo is capable of

  • Use Cargo to create, compile, and run a project

Learn all about variables!

In this video:

  • Declare and initialize immutable and mutable variables

  • Declare and initialize constants

  • First brush with compiler errors

Variables can only be used within a certain scope. This becomes very important later when we discuss ownership.

In this video:

  • Scope

  • Blocks

  • Shadowing variables

Memory safety is guaranteed at compile time.

In this video:

  • Declaration separate from initialization

Exercise A gives you an opportunity to try out using variables without violating scope and memory safety rules.

Functions are foundational to re-using code.

In this video:

  • Function declaration

  • Parameters and return values

  • Tail expressions

Exercise B gives you an opportunity to try out creating and calling function that return values.

A well-organized library is like sunshine and daisies.

In this video:

  • How to create a library module

  • "use" statements

  • Project dependencies

Scalar types are what everything else is built on.

In this video:

  • Integers

  • Floats

  • Booleans

  • Characters

The most primitive way to combine primitives.

In this video:

  • Tuples

  • Arrays

Exercise C gives you an opportunity to use simple scalar and compound types.

Controlling the flow of execution in Rust.

In this video:

  • if / else if / else - as an expression

  • loop

  • while

  • continue / break

  • for

More than you ever wanted to know about Strings in Rust, so you can stop running into walls and get on with your life.

In this video:

  • Strings and borrowed string slices

  • How a string is implemented, high-level

  • UTF-8

  • Bytes

  • Unicode scalars

  • Graphemes

  • Iterators (a little bit) and .nth()

Exercise D gives you an opportunity to use control flow and strings.

The very core of Rust. What makes it special and interesting compared to other systems programming languages.

In this video:

  • The 3 Rules of Ownership

  • Stack & Heap refresher

  • How ownership works under the hood, with Strings as an example

  • Drop

How to get things done despite the ownership rules.  Borrow it and refer to it.

In this video:

  • Immutable references

  • Mutable references

  • Reference values vs. reference types

  • The 2 rules of references

Exercise E gives you an opportunity to run through ownership & reference concepts in function calls.

Rust's take on classes (but better, naturally).

In this video:

  • Struct definition & implementation

  • Struct fields

  • Struct methods and associated functions

  • Object-Oriented? (Hint: That's the wrong question)

Composition over inheritance. Rust's approach to interfaces/protocols.

In this video:

  • Trait definition

  • Trait implementation

  • Trait inheritance

  • Default behavior

  • Generic functions

Exercise F gives you an opportunity to get some experience with Structs and Traits.

Structs in the standard library that implement common collection types.

In this video:

  • Vec

  • VecDeque

  • HashMap / BTreeMap

  • HashSet / BTreeSet

  • BinaryHeap

  • LinkedList

The unexpected power tool of Rust.  The reason you don't need null.

In this video:

  • Enum definition

  • Enum variants

  • Methods and associated functions for enums

  • Famous enums from the standard library: Option & Result

Exercise G gives you an opportunity to play with collections and enums.

An anonymous function that captures state and can be passed around.

In this video:

  • Closure syntax

  • Borrowing context

  • Capturing context by move

  • Examples with iterators

The way to burn CPU cores in parallel.  (For *waiting* for I/O in parallel, see Async/Await)

In this video:

  • Spawning a thread

  • Closure considerations

  • Join handles

Exercise H gives you an opportunity to explore closures and threads.

  • Create the "invaders" project

  • Set up dependencies

  • Set up and play audio

NOTE: If you are on Linux, you will need to install some dependencies if you want to run this code! (See the external resources links for this video).

  • Set up terminal handling & mode

  • Create a library

  • Add a frame library module to handle the logic of a single frame

  • Add a render library module to render a frame to the terminal

  • Launch a child thread with a render loop

  • Create a frame and send it to the render thread each iteration of the game loop

  • Create a player module

  • Create a player struct definition

  • Implement associated functions and methods for Player

  • Implement the Drawable trait for Player

  • Add a Player, input handling, and drawing into the frame to our game loop

  • Create a shot module

  • Create a Shot struct with associated functions and methods

  • Implement the Drawable trait for Shot

  • Update Player to manage a vector of Shot

  • Add shot input handling and timer updating to our game loop

  • Create an invaders module

  • Create Invader and Invaders structs with associated functions and methods

  • Implement the Drawable trait for Invaders

  • Add the invaders to our game loop

  • Add methods on the Invaders struct to detect win and loss conditions

  • Add a method on the Invaders struct to attempt to kill an alien

  • Wire the Player up to attempting to shoot aliens with his shots

  • In our gameloop, wire the player up to shooting aliens and detect our win and loss conditions

  • Playtesting!

Thank you for taking my course!  Send me a message letting me know your thoughts!  You can find out what I'm up to on my personal web site or on GitHub.

Traffic lights

Read about what's good
what should give you pause
and possible dealbreakers
Provides a hands-on introduction to Rust, which helps developers quickly grasp the language's core concepts through targeted exercises and projects
Covers ownership, references, and borrowing, which are essential for understanding Rust's memory management and safety features
Explores structs, traits, collections, and enums, which are fundamental building blocks for creating robust and maintainable applications
Includes a project building a terminal-based game with audio, which allows learners to apply their knowledge in a practical and engaging way
Teaches closures and threads, which are essential for writing concurrent and parallel programs in Rust
Is the first in a series, which suggests a comprehensive learning path for mastering Rust programming

Save this course

Create your own learning path. Save this course to your list so you can find it easily later.
Save

Reviews summary

Fast-paced practical rust fundamentals

According to learners, this is a largely positive crash course providing a solid introduction to the Rust language. Many found the course effective in teaching the core concepts, especially ownership and borrowing, which are crucial but often challenging. The hands-on exercises and the culminating terminal game project were highlighted as particularly valuable for practical application. Some students noted the pace is very fast, suggesting it's best suited for those with some prior programming experience, though others felt the clear explanations helped them keep up. Overall, it's seen as a great starting point to tackle Rust's steep learning curve.
The course moves quickly through fundamental topics.
"Be prepared for a fast ride! This course moves very quickly, which is great if you're already familiar with programming concepts."
"The pace is quite rapid; I had to pause and rewatch segments frequently to keep up, especially the later sections."
"While it covers a lot, the 'crash course' nature means some topics are only touched upon briefly before moving on."
"It feels like a true crash course - dense with information and moves very fast, sometimes too fast for absolute beginners."
The final project helped apply learned concepts.
"The terminal game project was a fantastic way to tie everything together and build something practical."
"Building the project at the end cemented my understanding more than just the exercises did."
"I really enjoyed the project module; it was challenging but rewarding to apply all the basics to a single program."
Provides a strong foundation for Rust.
"As someone completely new to Rust, this course provided an excellent entry point and covered all the necessary basics."
"This is a very good first course for Rust; it gives you the fundamental tools and concepts needed to start writing code."
"Great foundational course. It demystifies enough of Rust to make diving deeper less intimidating."
"I feel much more confident approaching other Rust resources after taking this crash course."
Key concepts like ownership and borrowing were clarified.
"This course really helped solidify my understanding of the ownership and borrowing system in Rust, which was a major hurdle for me."
"The explanations on ownership and borrowing were incredibly clear, finally making those core Rust concepts click."
"I was struggling with borrowing rules, but the module in this course broke it down effectively."
"The ownership sections are a highlight and essential for anyone new to Rust's memory model."
May be challenging without prior coding knowledge.
"While it's a crash course for Rust, I feel having prior experience in another programming language (like C++ or Python) is very helpful."
"If you're an absolute beginner to programming *in general*, this course might be overwhelming due to its speed and the complexity of Rust itself."
"I found it manageable because I have a background in C++, but I can see how it would be tough for someone with no coding history."

Activities

Be better prepared before your course. Deepen your understanding during and after it. Supplement your coursework and achieve mastery of the topics covered in Ultimate Rust Crash Course with these activities:
Review Systems Programming Concepts
Reinforce your understanding of systems programming concepts like memory management and concurrency, which are crucial for understanding Rust's design and safety features.
Browse courses on Systems Programming
Show steps
  • Review notes from previous systems programming courses.
  • Read articles or blog posts about systems programming challenges.
  • Complete practice problems related to memory management.
Review Systems Programming Concepts
Reinforce your understanding of systems programming concepts like memory management and concurrency, which are crucial for grasping Rust's ownership model and safety features.
Browse courses on Systems Programming
Show steps
  • Review materials on memory management techniques.
  • Study concurrency and parallelism concepts.
  • Practice identifying potential race conditions.
Review Systems Programming Concepts
Reinforce your understanding of systems programming concepts like memory management and concurrency, which are crucial for understanding Rust's design and safety features.
Browse courses on Systems Programming
Show steps
  • Review notes from previous systems programming courses.
  • Read articles or blog posts about systems programming challenges.
  • Complete practice problems related to memory management.
18 other activities
Expand to see all activities and additional details
Show all 21 activities
Review Systems Programming Concepts
Reinforce your understanding of systems programming concepts like memory management and concurrency, which are crucial for understanding Rust's design and safety features.
Browse courses on Systems Programming
Show steps
  • Review notes from previous systems programming courses.
  • Read articles or blog posts about systems programming challenges.
  • Complete practice problems related to memory management.
Review Systems Programming Concepts
Reinforce your understanding of systems programming concepts like memory management and concurrency, which are crucial for understanding Rust's design and safety features.
Browse courses on Systems Programming
Show steps
  • Review notes from previous systems programming courses.
  • Read articles or blog posts about systems programming challenges.
  • Complete practice problems related to memory management.
Review Systems Programming Concepts
Reinforce your understanding of systems programming concepts like memory management and concurrency, which are crucial for understanding Rust's design and safety features.
Browse courses on Systems Programming
Show steps
  • Review notes from previous systems programming courses.
  • Read articles or blog posts about systems programming challenges.
  • Complete practice problems related to memory management.
Review Systems Programming Concepts
Reinforce your understanding of systems programming concepts like memory management and concurrency, which are crucial for grasping Rust's ownership model and safety features.
Browse courses on Systems Programming
Show steps
  • Review materials on memory management techniques.
  • Study concurrency and parallelism concepts.
  • Practice identifying potential race conditions.
Review Systems Programming Concepts
Reinforce your understanding of systems programming concepts like memory management and concurrency, which are crucial for grasping Rust's ownership model and safety features.
Browse courses on Systems Programming
Show steps
  • Review materials on memory management techniques.
  • Study concurrency and parallelism concepts.
  • Practice identifying potential race conditions.
Read 'The Rust Programming Language'
Study the official Rust book to gain a solid foundation in the language's syntax, semantics, and core principles.
Show steps
  • Read the chapters on ownership and borrowing carefully.
  • Work through the examples provided in the book.
  • Take notes on key concepts and syntax.
Read 'The Rust Programming Language'
Deepen your understanding of Rust's core principles and syntax by working through the official Rust book.
Show steps
  • Read the chapters corresponding to the course syllabus.
  • Complete the exercises at the end of each chapter.
  • Experiment with the code examples in a Rust playground.
Read 'The Rust Programming Language'
Deepen your understanding of Rust's core principles and syntax by working through the official Rust book.
Show steps
  • Read the chapters on ownership and borrowing carefully.
  • Complete the exercises at the end of each chapter.
  • Refer back to the book when encountering difficulties in the course.
Read 'The Rust Programming Language'
Use the official Rust book as a reference to deepen your understanding of the language's features and best practices.
Show steps
  • Read the chapters relevant to the current course topics.
  • Try out the code examples provided in the book.
  • Refer to the book when encountering difficulties with course exercises.
Read 'The Rust Programming Language'
Deepen your understanding of Rust's core principles and syntax by working through the official Rust book.
Show steps
  • Read the chapters corresponding to the course syllabus.
  • Complete the exercises at the end of each chapter.
  • Experiment with the code examples in a Rust playground.
Read 'The Rust Programming Language'
Supplement the course material with the official Rust book to gain a deeper understanding of the language's features and design principles.
Show steps
  • Read the chapters corresponding to the course syllabus.
  • Work through the examples provided in the book.
  • Experiment with the code and try different variations.
Read 'The Rust Programming Language'
Deepen your understanding of Rust's core principles and syntax by working through the official Rust book.
Show steps
  • Read the chapters corresponding to the course syllabus.
  • Complete the exercises at the end of each chapter.
  • Experiment with the code examples in a Rust playground.
Read 'The Rust Programming Language'
Supplement the course material with the official Rust book to gain a deeper understanding of the language's features and design principles.
Show steps
  • Read the chapters corresponding to the course syllabus.
  • Work through the examples provided in the book.
  • Take notes on key concepts and syntax.
Ownership and Borrowing Exercises
Practice writing code that adheres to Rust's ownership and borrowing rules to avoid common memory safety errors.
Browse courses on Ownership
Show steps
  • Write functions that take ownership of data.
  • Create functions that borrow data immutably and mutably.
  • Debug code that violates borrowing rules.
Build a Simple Command-Line Tool
Apply your Rust knowledge by building a practical command-line tool that interacts with the file system or performs some data processing.
Show steps
  • Choose a simple command-line tool to implement.
  • Design the tool's interface and functionality.
  • Implement the tool in Rust, using appropriate data structures and control flow.
  • Test the tool thoroughly and fix any bugs.
Contribute to a Rust Open Source Project
Gain experience working with a real-world Rust codebase by contributing to an open-source project.
Browse courses on Open Source
Show steps
  • Find a Rust open-source project that interests you.
  • Identify a small bug or feature to work on.
  • Submit a pull request with your changes.
  • Respond to feedback from the project maintainers.
Read 'Programming Rust'
Supplement your learning with a comprehensive guide that covers advanced topics and real-world applications of Rust.
Show steps
  • Read the chapters on concurrency and asynchronous programming.
  • Experiment with the examples provided in the book.
  • Apply the concepts learned to your own projects.
Write a Blog Post on a Rust Topic
Solidify your understanding of a specific Rust topic by writing a blog post explaining it to others.
Browse courses on Blog
Show steps
  • Choose a Rust topic that you find interesting or challenging.
  • Research the topic thoroughly and gather relevant information.
  • Write a clear and concise blog post explaining the topic.
  • Publish the blog post on your own website or a platform like Medium.

Career center

Learners who complete Ultimate Rust Crash Course will develop knowledge and skills that may be useful to these careers:
Systems Programmer
Systems programmers work on the core components of operating systems and hardware interfaces. This career demands a deep understanding of low-level programming concepts, which this course will help build through its exploration of Rust. The course's emphasis on memory management, ownership, and concurrency directly applies to systems programming, allowing the systems programmer to create robust and efficient software. Systems programmers regularly use the concepts of ownership, references and borrowing, memory models, and concurrency; and this course offers targeted lessons on these very concepts. This course is an excellent fit for those seeking a career in systems programming.
Software Engineer
A software engineer designs, develops, and maintains software applications. This role often involves working with various programming languages, and this course provides a strong foundation in Rust, a language increasingly used for high-performance and systems-level programming. The course's focus on fundamentals, combined with hands-on exercises, helps build skills relevant to software engineering. Software engineers must understand concepts such as variables, functions, control flow, and data structures, which are all covered by this course. A software engineer also benefits from understanding how to read and write code, skills that are the core of this introductory course on Rust. This course is an ideal starting point for an aspiring software engineer who wants to learn or practice the Rust language.
Operating Systems Developer
Operating systems developers work on developing and maintaining the core software that manages computer hardware and software resources. This career requires in-depth knowledge of low-level programming, and this course in Rust is very helpful. The course covers memory management, concurrency, and systems-level programming concepts, which are essential when writing operating systems. Operating systems developers need to have mastery of the fundamentals of programming, and this course provides a strong foundation. This course is an excellent fit for those looking to pursue a career as an operating systems developer.
Embedded Systems Engineer
Embedded systems engineers design and develop software for devices with specific functions like medical devices, cars, and robotics. Rust's performance and safety features make it increasingly popular for embedded systems development. This course gives you a solid foundation in Rust, covering vital topics such as memory management, concurrency, and low-level programming skills, all of which are directly applicable to embedded systems work. Embedded systems engineers benefit from the practical, hands-on approach of the course, particularly when learning how to use Cargo, create projects, compile code, and run it. Anyone interested in a career as an embedded systems engineer may find this introductory course very useful.
Game Developer
Game developers create the software that drives video games. They require expertise in programming languages that are performant, reliable, and capable of handling complex tasks, and this is where Rust comes in. This course introduces the fundamentals of Rust, which can be used to build game engines and game logic. Game developers also need to understand how to manage memory and ensure program stability, concepts this course addresses directly. A large part of game development is writing code. This course is a great starting point for game developers because of its focus on hands-on coding in Rust. In particular, the course's hands-on exercises and end-to-end project creating a simple terminal-based game with audio is highly relevant.
Robotics Engineer
Robotics engineers design, build, and program robots. This career requires proficiency in programming languages that can handle real-time control and complex computations, and this course provides a foundation in Rust. The course's emphasis on performance, memory management, and concurrency make it useful for robotics applications. The curriculum of this course directly discusses systems programming, which is core to robotics. This course is a strong foundation for an aspiring robotics engineer, particularly as they start learning and working with systems programming.
Firmware Engineer
Firmware engineers develop low-level software that controls hardware devices. This role requires a deep understanding of system-level programming, and this course in Rust can help build the necessary skills. The course emphasis on ownership, references and borrowing, memory models, and concurrency, are all directly relevant to firmware engineering. Firmware engineers benefit from hands-on practice in programming, and this course's exercises and projects provide the opportunity to do so. This course is a useful starting point for an aspiring firmware engineer.
High-Performance Computing Engineer
High performance computing engineers focus on optimizing and developing software for computationally intensive tasks. Rust, a language that is the focus of this course, is gaining traction in this area due to its speed and efficiency. This course provides a solid grounding in Rust's core concepts, including memory management and concurrency, which are essential for high-performance applications. High performance computing engineers utilize foundational concepts such as functions, control flow and data structures on a daily basis, which are covered in this course. This course is a helpful starting point for those wanting to step into high performance computing.
Blockchain Developer
Blockchain developers create and maintain decentralized applications and protocols using blockchain technology. Rust's performance and safety features make it a suitable choice for blockchain development. This course helps build a foundation in Rust, a core skill for blockchain development. The course focuses on fundamental concepts, including ownership, memory management, and concurrency, all of which are incredibly relevant when working with blockchains. Blockchain developers must understand how to write code, and this course provides the opportunity to do so with hands-on exercises. This course is a good starting point for a career as a Blockchain developer.
Web Assembly Developer
Web Assembly developers create code that runs in web browsers at near-native speeds. This course introduces the foundational concepts of Rust, a language that is very suitable for Web Assembly development. The course covers the fundamentals of variables, scope, functions, and modules, all of which are important when working with Web Assembly. Web assembly developers need to be able to write code that is fast and efficient, and this course provides essential tools to build this skill. Web Assembly developers use the same concepts as systems programmers, and this course provides the relevant knowledge to do so. This course is potentially useful for someone aiming for a job as a Web Assembly developer.
Security Engineer
Security engineers focus on protecting computer systems and networks from threats. This career requires a strong understanding of programming languages, system architecture, and security principles. This course helps build a working knowledge of the Rust language, which is known for its safety features. The course's emphasis on memory management and concurrency, can help security engineers understand code and system vulnerabilities. This course may be a helpful starting point to those seeking a role as a security engineer.
Compiler Engineer
Compiler engineers design and develop the software that translates programming languages into machine code. This work requires deep knowledge of programming language principles and compiler design, and this course's focus on Rust can be useful. The course covers essential features of the Rust language, which can give the compiler engineer insight into how compilers work. Compiler engineers benefit from courses that emphasize both practical skills and theoretical knowledge. This course may be a good starting point for those interested in a career as a Compiler engineer.
Financial Software Developer
Financial software developers create applications for the financial services industry. These applications often require high performance, security, and reliability. Rust's features, which are the focus of this course, make it a suitable choice for critical financial systems. This course helps build a strong foundation in Rust, a vital skill for this career field. A financial software developer benefits from the course's focus on variables, scope, functions, and more. This course may be helpful when seeking a role as a financial software developer.
DevOps Engineer
DevOps engineers focus on streamlining the software development lifecycle through automation and collaboration. This role often requires familiarity with various programming languages. This course helps build the fundamentals in Rust. The course's focus on creating projects, compiling code, and running it, are all useful in the world of DevOps. DevOps engineers work with system-level concepts, and this course's focus on memory management, ownership, and concurrency are relevant. The course may be a good starting point when wanting to work as a DevOps engineer.
Database Developer
Database developers design, develop, and maintain databases and the systems around them. This role often deals with optimizing performance and ensuring data integrity. This course's focus on memory management, ownership, and concurrency in Rust can be useful in database development, specifically in writing highly performant applications. Database developers must be comfortable writing code, and this course offers the opportunity to do so. This course may be helpful if you want to work as a database developer.

Reading list

We've selected two books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in Ultimate Rust Crash Course.
Is the official guide to Rust and provides a comprehensive overview of the language. It covers everything from basic syntax to advanced topics like concurrency and unsafe Rust. It is an invaluable resource for understanding the core concepts and best practices of Rust programming. This book is commonly used as a textbook at academic institutions.
Provides a practical, hands-on approach to learning Rust. It covers a wide range of topics, including concurrency, networking, and embedded systems. It valuable resource for experienced programmers who want to learn Rust quickly. This book is helpful in providing background and prerequisite knowledge.

Share

Help others find this course page by sharing it with your friends and followers:

Similar courses

Similar courses are unavailable at this time. Please try again later.
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2025 OpenCourser