O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Learning Rust

Video Description

Learn to write fast, low-level code without fear in Rust

About This Video

  • Discover Rust’s powerful type system, which prevents data races and memory corruption
  • Build concurrent applications without fear
  • Take advantage of the large ecosystem of libraries available through Cargo

In Detail

Rust is a new systems programming language from Mozilla, created to facilitate the development of large, complex software projects. Its powerful type system and memory safety rules prevent all memory corruption bugs without compromising developer productivity.

In this course, you’ll begin 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 code bundle for this video course is also available on Github: https://github.com/PacktPublishing/Learning-Rust-video

Table of Contents

  1. Chapter 1 : The Power of Rust
    1. The Course Overview 00:01:35
    2. Bindings and Mutability 00:02:16
    3. Built-In Types 00:12:00
    4. Imports and Namespaces 00:07:25
    5. The Standard Library 00:04:25
    6. Recursive Fibonacci 00:05:14
    7. Dynamic Fibonacci 00:07:23
  2. Chapter 2 : Rustup and Cargo
    1. Installing Rust with Rustup 00:02:18
    2. Managing Toolchains with Rustup 00:02:30
    3. Creating Projects with Cargo 00:08:15
    4. Exploring the Crate Ecosystem 00:05:16
    5. Rustdoc and the Documentation Ecosystem 00:04:36
    6. Adding Dependencies with Cargo 00:14:01
  3. Chapter 3 : Ownership and Borrowing
    1. Motivation for the Borrow Checker 00:03:53
    2. Ownership, Borrowing, and RAII 00:06:27
    3. Shared and Exclusive Access 00:12:26
    4. Fighting with the Borrow Checker 00:02:11
    5. Strings, Strs, Vecs, and Slices 00:03:26
    6. Understanding Borrow Checker Errors 00:01:15
  4. Chapter 4 : Basic Types – Enums and Structs
    1. Structured Data 00:08:20
    2. Enumerations 00:04:36
    3. Match Expressions 00:10:56
    4. Designing a Markup Language 00:04:38
    5. Implementing the Markup Language 00:13:19
  5. Chapter 5 : Advanced Types – Traits and Generics
    1. Introduction to Traits 00:02:05
    2. Built-In Traits 00:03:01
    3. Writing Your Own Traits 00:07:58
    4. Generic Functions 00:05:40
    5. Generic Types 00:02:03
    6. Trait Objects and Dynamic Dispatch 00:04:13
  6. Chapter 6 : Functional Features and Concurrency
    1. Closures 00:06:08
    2. Iterators 00:05:18
    3. Map, Filter, and Fold 00:05:06
    4. Building a Barycenter Finder 00:10:58
    5. Parallelizing the Barycenter Finder 00:11:10
  7. Chapter 7 : Idiomatic Rust
    1. Breaking Up Code with Modules 00:03:48
    2. Error Handling 00:03:01
    3. API Design 00:02:34
    4. Unit Testing 00:18:01
    5. Integration Testing 00:06:48
    6. Documentation 00:07:28