Ultimate Rust Crash Course
- Description
- Curriculum
- FAQ
- Reviews
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 create 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!
-
3CargoVideo lesson
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
-
4VariablesVideo lesson
Learn all about variables!
In this video:
Declare and initialize immutable and mutable variables
Declare and initialize constants
First brush with compiler errors
-
5ScopeVideo lesson
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
-
6Memory SafetyVideo lesson
Memory safety is guaranteed at compile time.
In this video:
Declaration separate from initialization
-
7Exercise A - VariablesVideo lesson
Exercise A gives you an opportunity to try out using variables without violating scope and memory safety rules.
-
8FunctionsVideo lesson
Functions are foundational to re-using code.
In this video:
Function declaration
Parameters and return values
Tail expressions
-
9Exercise B - FunctionsVideo lesson
Exercise B gives you an opportunity to try out creating and calling function that return values.
-
10Module SystemVideo lesson
A well-organized library is like sunshine and daisies.
In this video:
How to create a library module
"use" statements
Project dependencies
-
11Scalar TypesVideo lesson
Scalar types are what everything else is built on.
In this video:
Integers
Floats
Booleans
Characters
-
12Compound TypesVideo lesson
The most primitive way to combine primitives.
In this video:
Tuples
Arrays
-
13Exercise C - Simple TypesVideo lesson
Exercise C gives you an opportunity to use simple scalar and compound types.
-
14Control FlowVideo lesson
Controlling the flow of execution in Rust.
In this video:
if / else if / else - as an expression
loop
while
continue / break
for
-
15StringsVideo lesson
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()
-
16Exercise D - Control Flow & StringsVideo lesson
Exercise D gives you an opportunity to use control flow and strings.
-
17OwnershipVideo lesson
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
-
18References & BorrowingVideo lesson
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
-
19Exercise E - Ownership & ReferencesVideo lesson
Exercise E gives you an opportunity to run through ownership & reference concepts in function calls.
-
20StructsVideo lesson
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)
-
21TraitsVideo lesson
Composition over inheritance. Rust's approach to interfaces/protocols.
In this video:
Trait definition
Trait implementation
Trait inheritance
Default behavior
Generic functions
-
22Exercise F - Structs & TraitsVideo lesson
Exercise F gives you an opportunity to get some experience with Structs and Traits.
-
23CollectionsVideo lesson
Structs in the standard library that implement common collection types.
In this video:
Vec
VecDeque
HashMap / BTreeMap
HashSet / BTreeSet
BinaryHeap
LinkedList
-
24EnumsVideo lesson
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
-
25Exercise G - Collections & EnumsVideo lesson
Exercise G gives you an opportunity to play with collections and enums.
-
26ClosuresVideo lesson
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
-
27ThreadsVideo lesson
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
-
28Exercise H - Closures & ThreadsVideo lesson
Exercise H gives you an opportunity to explore closures and threads.
-
29Invaders Part 1 - Setup AudioVideo lesson
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).
-
30Invaders Part 2 - Rendering & MultithreadingVideo lesson
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
-
31Invaders Part 3 - The PlayerVideo lesson
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
-
32Invaders Part 4 - ShootingVideo lesson
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
-
33Invaders Part 5 - InvadersVideo lesson
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
-
34Invaders Part 6 - Winning & LosingVideo lesson
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!

External Links May Contain Affiliate Links read more