The Rust Programming Language
4.4 (118 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
669 students enrolled
Wishlisted Wishlist

Please confirm that you want to add The Rust Programming Language to your Wishlist.

Add to Wishlist

The Rust Programming Language

Learn a modern, powerful yet safe systems programming language!
Bestselling
4.4 (118 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
669 students enrolled
Created by Dmitri Nesteruk
Last updated 7/2017
English
Current price: $10 Original price: $50 Discount: 80% off
5 hours left at this price!
30-Day Money-Back Guarantee
Includes:
  • 5.5 hours on-demand video
  • 2 Supplemental Resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • Solve problems in Rust
  • Understand Rust's strengths and weaknesses
  • Effectively leverage Rust's memory safety guarantees
  • Write applications and libraries
  • Test and document your code
View Curriculum
Requirements
  • Basic knowledge of computer science
  • A computer with a Rust-enabled IDE (VisualRust, intellij-rust, etc.)
Description

This course will teach you the fundamentals of Rust, a modern programming language that has the both the power of native code as well as the safety of some managed languages. In this course you will learn the following:

  • How to download and install Rust; how to compile programs and (optionally) work with an IDE.
  • Learn about fundamental data types and how to use them to declare variables.
  • Undersand arrays, vectors and strings, the concept of slices.
  • Learn to create functions, methods, closures, higher-order functions.
  • Understand how to create various data structures such as structs and enums; also traits.
  • Master Rust's explicit take on the concept of lifetime with ownership, borrowing, lifetime specifiers, lifetime elision.
  • Learn how to safely share data around your (possibly multithreaded) application with Rc, Arc and Mutex.
  • Use Rust's package managent using Cargo.
  • Learn about other useful topics: documentation, conditional compilation, testing.

This course, like all my other courses, will be supplemented with additional lectures based on participants' requests.

Who is the target audience?
  • Systems programmers
  • Experienced developers interested in Rust
  • C/C++ programmers
Students Who Viewed This Course Also Viewed
Curriculum For This Course
44 Lectures
05:15:28
+
Introduction
5 Lectures 21:12

Welcome to the course! Now, for a taste of things to come...

Preview 03:32

Let's get started by installing Rust.

Installing and Configuring Rust
02:40

The obligatory Hello, World! demo, made with Rust.

Preview 03:31

Learn about Cargo, Rust's own project and dependency management system. 

Note that Cargo configures your folder to be a Git repository and creates a .gitignore file.

Introducing the Cargo Package Manager
07:59

Working with a plain-text editor is OK, but work in an IDE is much more comfortable.

Preview 03:30
+
Types and Variables
5 Lectures 49:46

Learn about boolean, integral, floating-point types and the char type.

Core Data Types
16:12

A description of some of the Rust operators such as +, <=, && and so on.

Operators
10:25

A discussion of scopes and how variables in inner scopes can shadow outer variables.

Scope and Shadowing
06:13

Global values that are unlikely to change.

Declaring and Using Constants
04:32

Learn about the distinction between the stack and the heap,

Stack and Heap
12:24
+
Control Flow
4 Lectures 22:46

Learn about the if statement, including some unusual syntax. (And no, Rust does not have a ternary ?: operator.)

If Statement
07:20

A look at conditional and unconditional loops.

While and Loop
04:08

for loops... also very unusual.

For Loops
04:47

A look at match which lets you pick the right option based on matching input plus additional conditions. Very powerful!

Match Statement
06:31
+
Data Structures
11 Lectures 01:35:07

A very important topic! Structs let us keep related data together in a single object.

(Note: there is no concept of constructor in Rust.)

Structs
03:40

A traffic light can be red, green or blue. How to best represent this information in a program?

Enumerations
08:59

With the release of Rust 1.19, we've got a new data type called a union. A union can define several fields of different type, but they all occupy the same memory. Unions are very useful for C interop, among other things.

Unions
05:39

Here we talk about a very useful type called Option<T>, the None/Some(x) duality, and also discuss the if let and while let declarations.

Option<T> and if let/while let
06:56

Learn how to store multiple values of any type in a single data structure as well as how to go over those values.

Arrays
13:03

A vector is like an array, but resizeable. Also behaves like a stack.

Vectors
13:09

A slice is a read-only view into an array or a vector.

Slices
05:26

Strings are used to store text (i.e., sequences of characters). Learn about both str and String. Both are valid UTF-8 sequences of bytes.

Why does str exist? Because an ordinary slice of a String is effectively a slice of Vec<u8>, which is not very useful.

Strings
11:00

Learn about tuples, their destructuring and indexing. (Yes, destructuring is a word.)

Tuples
09:31

Now that we know more about various data structures, let's revisit the match keyword and discuss pattern matching, an extremely powerful technique.

Pattern Matching
11:50

Learn about generic structures.

Generics
05:54
+
Functions
4 Lectures 26:41

We've already met the function main, but now we discuss functions at large.

Functions and Function Arguments
06:38

A struct can have not just fields but also its own functions!

Methods
02:58

How do you store a function in a variable? How do you pass a function to some other function? These concerns are addressed with closures (a.k.a. lambda functions).

Closures
10:48

Functions that return functions. Don't worry, it's not as scary as it sounds.

Higher-Order Functions
06:17
+
Traits
5 Lectures 31:36

Traits let you specify that a type must possess certain aspects.

Traits
12:41

Learn how to define the behavior of operators such as + for your own structs.

Operator Overloading
04:12

One of two possible forms of dispatch. Static dispatch is when the compiler knows exactly which realization of function to call.

Static Dispatch
06:33

What if the compiler doesn't know which trait implementation to call?

Dynamic Dispatch
03:07

So given that static dispatch is faster, why would we want to use dynamic dispatch, anyway?

Preview 05:03
+
Lifetime and Memory
6 Lectures 41:02

Learn about ownership, move semantics and move-able types.

Ownership
08:31

Borrowing
07:12

We finally get to look at explicit use of lifetime specifiers. Woo-hoo!

Lifetime
07:50

In addition to ownership/borrowing, Rust also supports the notion of reference-counted variables. These are somewhat easier to share. The approach is similar to C++'s shared_ptr/unique_ptr.

Reference-Counted Variables (Rc)
06:27

A reference-counted variable (Rc) is safe to share around within a single thread. But what if we want to share it around in multiple threads? How can we ensure its pointer count is actually safe from concurrent modification? That's what the Arc class is for.

Atomic Reference-Counted Variables (Arc)
03:57

Arc protects the reference count, but it doesn't protect the variable itself, so concurrent modification of the variable will still be prohibited by the Rust compiler. How can we get concurrent code that mutates the variable to work? One option is to use a Mutex.

Using a Mutex for Thread-Safe Mutability
07:05
+
Odds & Ends
4 Lectures 27:18

Let's try using a crate that's available on crates.io.

Consuming Crates
05:04

Let's build our own crate out of separate modules... and then consume it!

Building Modules and Crates
11:29

Now that we know about functions, we can write unit and integration tests.

Testing
04:42

Learn how to document your own code.

Comments and Documentation
06:03
About the Instructor
Dmitri Nesteruk
4.5 Average rating
809 Reviews
8,859 Students
13 Courses
Quant Finance • Algotrading • Software/Hardware Engineering

Dmitri Nesteruk is a developer, speaker and podcaster. His interests lie in software development and integration practices in the areas of computation, quantitative finance and algorithmic trading. His technological interests include C#, F# and C++ programming as well high-performance computing using technologies such as CUDA. He has been a C# MVP since 2009.

Dmitri is a graduate of University of Southampton (B.Sc. Computer Science) where he currently holds a position as a Visiting Researcher. He is also an instructor on an online intro-level Quantitative Finance course, and has also made online video courses on CUDA, MATLAB, D, the Boost libraries and other topics.