Rust: Building Reusable Code with Rust from Scratch

6h 17m 32s
English
Paid

Course description

Rust is a systems programming language with a focus on safety, especially safe concurrency, supporting both functional and imperative paradigms, syntactically similar to C++, but its designers intend it to provide better memory safety while still maintaining performance. With this hands-on, practical course, you’ll begin from scratch by getting familiar with the basic syntax and concepts of Rust, defining functions and creating variables & much more.

Read more about the course

Then you'll learn to test your code by building a simple crate with a tested, usable, well-documented API using Cargo & RustDoc. Next, you will work with different forms of code reuse, loops, map, filter and fold to save time and resources & to use your code in a reusable manner in your apps.

By end of this course you will be able to avoid code duplication and write clean reusable code,  also you'll be comfortable building various solutions in Rust

Contents and Overview

This training program includes 2 complete courses, carefully chosen to give you the most comprehensive training possible.

The first course, Learning Rust begins by getting familiar with the basic syntax and concepts of Rust, from writing a Hello World program to defining functions and creating variables. Then you’ll see how to manage toolchains with Rust up and build your first command-line program. Moving on, you’ll explore Rust’s type system to write better code and put it into practice in a simple markup language. You’ll learn to use Rust’s functional programming features to perform a physics simulation and use the Rayon crate to parallelize your computations. Finally, you’ll discover the best practices and test your code by building a simple crate with a tested, usable, well-documented API using Cargo and RustDoc. By the end of the video, you’ll be comfortable building various solutions in Rust. You’ll be able to take advantage of Rust’s powerful type system and a rich ecosystem of libraries, or “crates”, available through the Cargo package manager.

The second course, Building Reusable Code with Rust will start with teaching you how to build reusable Rust code so that you can stop copying and pasting the code. Write code that can adapt to many different usages. You will reuse code by using advanced features such as traits, generics, and macros. You will work with different forms of code reuse, loops, map, filter and fold to save time and resources. Achieve higher-level reuse without sacrificing runtime performance. Organize your code into modules and crates to publish them to crates .io. By the end of the course, you will be able to avoid code duplication and write clean reusable code.

Watch Online

This is a demo lesson (10:00 remaining)

You can watch up to 10 minutes for free. Subscribe to unlock all 68 lessons in this course and access 10,000+ hours of premium content across all courses.

View Pricing

Watch Online Rust: Building Reusable Code with Rust from Scratch

0:00
/
#1: The Course Overview

All Course Lessons (68)

#Lesson TitleDurationAccess
1
The Course Overview Demo
01:35
2
Bindings and Mutability
02:16
3
Built-In Types
12:01
4
Imports and Namespaces
07:25
5
The Standard Library
04:25
6
Recursive Fibonacci
05:15
7
Dynamic Fibonacci
07:24
8
Installing Rust with Rustup
02:18
9
Managing Toolchains with Rustup
02:30
10
Creating Projects with Cargo
08:16
11
Exploring the Crate Ecosystem
05:17
12
Rustdoc and the Documentation Ecosystem
04:37
13
Adding Dependencies with Cargo
14:02
14
Motivation for the Borrow Checker
03:54
15
Ownership, Borrowing, and RAII
06:28
16
Shared and Exclusive Access
12:27
17
Fighting with the Borrow Checker
02:11
18
Strings, Strs, Vecs, and Slices
03:27
19
Understanding Borrow Checker Errors
01:15
20
Structured Data
08:21
21
Enumerations
04:36
22
Match Expressions
10:57
23
Designing a Markup Language
04:38
24
Implementing the Markup Language
13:20
25
Introduction to Traits
02:06
26
Built-In Traits
03:01
27
Writing Your Own Traits
07:59
28
Generic Functions
05:41
29
Generic Types
02:03
30
Trait Objects and Dynamic Dispatch
04:14
31
Closures
06:09
32
Iterators
05:19
33
Map, Filter, and Fold
05:06
34
Building a Barycenter Finder
10:59
35
Parallelizing the Barycenter Finder
11:11
36
Breaking Up Code with Modules
03:48
37
Error Handling
03:01
38
API Design
02:35
39
Unit Testing
18:01
40
Integration Testing
06:49
41
Documentation
07:28
42
The Course Overview
03:16
43
Setting Up the Rust Development Environment
03:55
44
Exploring Code Reuse in Rust
03:16
45
Loops and Iterators
05:41
46
Using Functional Programming Loops
13:50
47
Functions in Rust
03:07
48
Exploring Generics
02:27
49
Use Generic Functions to Reuse Algorithms
03:50
50
Reuse Structures in Enums and Structs
02:31
51
Working with Generic in Struct Methods
03:44
52
Generics in the Rust Standard Library – Part I
03:46
53
Generics in the Rust Standard Library – Part II
05:49
54
Exploring Traits
03:13
55
Using Trait Bounds and Trait Objects to Communicate Interfaces
03:42
56
Associated Types versus Generics and Trait Inheritance
02:57
57
Exploring Traits, Generics, and Performance
03:31
58
Traits in the Rust Standard Library – Part I
07:43
59
Traits in the Rust Standard Library – Part II
06:25
60
Write Code with Code – Metaprogramming in Rust
02:29
61
Use Declarative Macros to Write Less Code
04:06
62
Using Procedural Macros for Custom Derive
04:44
63
Macros in the Rust Standard Library – Part I
04:56
64
Macros in the Rust Standard Library – Part II
05:40
65
Introducing Crates
05:06
66
Using Modules to Define the Structure of Crates
04:28
67
Using a Crate with Cargo.toml
06:07
68
Publishing to crates.io
02:48

Unlock unlimited learning

Get instant access to all 67 lessons in this course, plus thousands of other premium courses. One subscription, unlimited knowledge.

Learn more about subscription

Comments

0 comments

Want to join the conversation?

Sign in to comment

Similar courses

Rust Developer Bootcamp

Rust Developer Bootcamp

Sources: letsgetrusty.com
Who is this Bootcamp for? Experienced Developers trying to switch to Rust. Learn the language of the future. Your time is valuable (literally, $148,688/yr). Learn Rust FAST wit...
9 hours 50 minutes 20 seconds
Rust as a Service

Rust as a Service

Sources: ardanlabs.com
This course teaches integrating Rust into service-oriented architectures, covering REST server development, data handling, error management, and modularization. You'll learn tra...
6 hours 13 minutes 47 seconds
Rust for Beginners

Rust for Beginners

Sources: zerotomastery.io
Do you want to try Rust but don't know where to start? This course will be your starting point. Whether you have programming experience or not...
3 hours 18 minutes 19 seconds
Ultimate Rust Foundations

Ultimate Rust Foundations

Sources: ardanlabs.com
Ultimate Rust: This course covers many best practices to help you integrate Rust into your workflow, and let Rust’s tooling work for you. It includes formatting, linting, depend...
17 hours 53 minutes 36 seconds
Learn Rust in a Month of Lunches

Learn Rust in a Month of Lunches

Sources: Dave MacLeod
"Learn Rust in a Month of Lunches" - just one month and one hour a day to start writing code in Rust! This book teaches you to write ultra-fast and safe code...