Skip to main content
CourseFlix

Rust: Building Reusable Code with Rust from Scratch

6h 17m 32s
English
Paid

Rust is a systems programming language designed with a focus on safety, particularly safe concurrency. It supports both functional and imperative paradigms and is syntactically similar to C++. However, its designers aim to provide superior memory safety while maintaining high performance. In this hands-on, practical course, you will start from scratch, becoming familiar with Rust's basic syntax and concepts, defining functions, creating variables, and much more.

Mastering Rust Code Development

Through this course, you will learn to test your code by building a simple crate with a well-documented and tested API using Cargo and RustDoc. You will explore various forms of code reuse, including loops, map, filter, and fold, to create reusable code for your applications, saving time and resources.

Course Outcomes

By the end of this course, you will be equipped to avoid code duplication and write clean, reusable code. You will also be confident in building diverse solutions using Rust.

Contents and Overview

This training program comprises two comprehensive courses, carefully selected to provide a holistic learning experience.

Course 1: Learning Rust

Learning Rust begins by introducing you to Rust's basic syntax and concepts, from writing a Hello World program to defining functions and creating variables. You'll learn to manage toolchains with Rustup and build your first command-line program. Moving forward, you'll delve into Rust's type system to enhance your coding skills and practice them in a simple markup language. You'll also employ Rust's functional programming features for a physics simulation and use the Rayon crate for parallel computations. Finally, you'll embrace best practices and learn to test your code by building a simple crate with a tested, usable, and well-documented API using Cargo and RustDoc. By course end, you'll be adept at creating various solutions in Rust and utilizing its robust type system and rich ecosystem of libraries, or "crates," via the Cargo package manager.

Key Learning Points

  • Introduction to Rust's basic syntax and concepts
  • Managing toolchains with Rustup
  • Building command-line programs
  • Exploring Rust's type system
  • Practicing Rust's functional programming features
  • Parallel computations with the Rayon crate
  • Testing and documenting code using Cargo and RustDoc

Course 2: Building Reusable Code with Rust

Building Reusable Code with Rust teaches you to develop reusable Rust code, eliminating the need for repetitive code. You'll craft adaptable code with advanced features such as traits, generics, and macros. Additionally, you'll engage with different forms of code reuse, including loops, map, filter, and fold, enabling high-level reuse without compromising runtime performance. The course also covers organizing your code into modules and crates, preparing you to publish them on crates.io. By course completion, you'll avoid code duplication and consistently create clean, reusable code.

Core Competencies

  • Developing adaptable code with traits, generics, and macros
  • Using loops, map, filter, and fold for code reuse
  • Organizing code into modules and crates
  • Publishing crates on crates.io
  • Writing clean, reusable Rust code

About the Author: udemy

udemy thumbnail
By connecting students all over the world to the best instructors, Udemy is helping individuals reach their goals and pursue their dreams. Udemy is the leading global marketplace for teaching and learning, connecting millions of students to the skills they need to succeed. Udemy helps organizations of all kinds prepare for the ever-evolving future of work. Our curated collection of top-rated business and technical courses gives companies, governments, and nonprofits the power to develop in-house expertise and satisfy employees’ hunger for learning and development.

Watch Online 68 lessons

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