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

Udemy is a global online marketplace for teaching and learning. It connects students with instructors who share skills in many fields.

Who Uses Udemy

Millions of learners use Udemy to gain skills for work and personal growth. Companies, governments, and nonprofits also use Udemy to train their teams.

What Udemy Offers

Udemy provides a curated set of business and technical courses. These courses help teams build practical skills and support ongoing learning at work.

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

Related courses

  • Ultimate Rust Best Practices thumbnail

    Ultimate Rust Best Practices

    Sources: ardanlabs.com
    This course covers many best practices to help you with integrate Rust into your workflow, and let Rust’s tooling work for you. It includes formatting, linting, dependencies…
    1 hour 39 minutes 25 seconds 5 / 5
  • Ultimate Rust 2: Intermediate Concepts thumbnail

    Ultimate Rust 2: Intermediate Concepts

    Sources: ardanlabs.com
    Master the Rust language: delve into variables, functions, and memory structure. For system developers looking to create safe and fast code.
    5 hours 1 minute 56 seconds
  • Rust as a Service thumbnail

    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.
    6 hours 13 minutes 47 seconds 5 / 5
  • Rust for Beginners thumbnail

    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 5 / 5
  • Rust for JavaScript Developers thumbnail

    Rust for JavaScript Developers

    Sources: Sidhartha Chatterjee
    If you're a JavaScript developer like me, you might've been curious about Rust lately. A lot of modern JavaScript tooling (like Rome) is being re-written in Rus
  • Ultimate Rust: Foundations - Next Steps thumbnail

    Ultimate Rust: Foundations - Next Steps

    Sources: ardanlabs.com
    This course offers the next steps not covered in Ultimate Rust: Foundations that expand on and optimize what you’ve already built.
    50 minutes 48 seconds 5 / 5