Ultimate Rust Crash Course
4.6 (130 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
649 students enrolled

Ultimate Rust Crash Course

Rust Programming Fundamentals
Highest Rated
4.6 (130 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
652 students enrolled
Created by Nathan Stocks
Last updated 7/2020
English
English
Current price: $41.99 Original price: $59.99 Discount: 30% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 3 hours on-demand video
  • 1 downloadable resource
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • Rust language fundamentals
  • Rust tooling and ecosystem
  • Systems programming
  • Fun tips and tricks
Course content
Expand all 34 lectures 02:52:48
+ Introduction
2 lectures 04:24

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

Preview 03:29

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

Preview 00:55
+ Fundamentals
8 lectures 27:10

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

Preview 03:53

Learn all about variables!

In this video:

  • Declare and initialize immutable and mutable variables

  • Declare and initialize constants

  • First brush with compiler errors

Variables
04:50

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

Scope
02:40

Memory safety is guaranteed at compile time.

In this video:

  • Declaration separate from initialization

Memory Safety
01:33

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

Exercise A - Variables
04:55

Functions are foundational to re-using code.

In this video:

  • Function declaration

  • Parameters and return values

  • Tail expressions

Functions
02:06

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

Exercise B - Functions
03:23

A well-organized library is like sunshine and daisies.

In this video:

  • How to create a library module

  • "use" statements

  • Project dependencies

Module System
03:50
+ Primitive Types & Control Flow
6 lectures 27:48

Scalar types are what everything else is built on.

In this video:

  • Integers

  • Floats

  • Booleans

  • Characters

Scalar Types
04:41

The most primitive way to combine primitives.

In this video:

  • Tuples

  • Arrays

Compound Types
02:08

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

Exercise C - Simple Types
06:25

Controlling the flow of execution in Rust.

In this video:

  • if / else if / else - as an expression

  • loop

  • while

  • continue / break

  • for

Control Flow
05:23

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()

Preview 04:43

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

Exercise D - Control Flow & Strings
04:28
+ The Heart of Rust
3 lectures 15:34

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

Preview 06:03

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

References & Borrowing
04:42

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

Exercise E - Ownership & References
04:49
+ The Meat of Rust
6 lectures 27:34

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)

Structs
03:09

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

In this video:

  • Trait definition

  • Trait implementation

  • Trait inheritance

  • Default behavior

  • Generic functions

Traits
04:57

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

Exercise F: Structs & Traits
02:47

Structs in the standard library that implement common collection types.

In this video:

  • Vec

  • VecDeque

  • HashMap / BTreeMap

  • HashSet / BTreeSet

  • BinaryHeap

  • LinkedList

Collections
02:54

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

Enums
07:18

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

Exercise G: Collections & Enums
06:29
+ Final Lectures
3 lectures 12:45

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

Closures
02:25

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

Threads
02:23

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

Exercise H: Closures & Threads
07:57
+ Project: Invaders
6 lectures 57:33
  • Create the "invaders" project

  • Set up dependencies

  • Set up and play audio

NOTE: If you are on Linux, you will need to install the "Linux Audio Dependencies" if you want to run this code! (See the links for this video).


Preview 04:25
  • 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

Invaders Part 2: Rendering & Multithreading
18:26
  • 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

Invaders Part 3: The Player
04:28
  • 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


Invaders Part 4: Shooting
09:01
  • 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

Invaders Part 5: Invaders
13:00
  • 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!

Invaders Part 6: Winning & Losing
08:13
Requirements
  • A basic understanding of general programming concepts
  • An basic knowledge of any programming language (For example Python, C, C++, Javascript, or Ruby)
Description

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

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.


Who this course is for:
  • Aspiring systems programmers, software developers, engineers, wizards, warriors, and hobbits
  • Any developer who needs to run code fast, efficiently, securely, under tight restraints, or with a minimum of bugs.