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

Learn Rust in 7 Days

Video Description

Use the full power of Rust to make fast, maintainable systems level programs in one week

About This Video

  • Learn to write libraries and programs, that take advantage of rusts Traits to give them great flexibility
  • Build a Rust application called MiniBank that allows users to view their accounts and make payments to each other
  • Increase your confidence in understanding lifetimes and the borrow checker

In Detail

The Rust programming language makes it possible to build fast reliable code, prevents segfaults, and guarantees memory safety, even while working across concurrent processes.

The course is split into seven parts, which give you a complete overview of why Rust is a great programming language. In the first couple of days, you’ll learn to install Rust on your system, discover its syntax, and see a library that utilizes the feature of trait-based generics and code reusability.

On days 3 and 4, you’ll understand how Rust Lifetimes work by doing extensive compiler checking and learn to make your programs more interactive by accessing all the bits of the Rust environment. On day 5, you’ll learn about multithreading without data races with safe concurrency. Day 6, you’ll create a database, using your code to read and update while securing it with Bcrypt from various breaches such as SQL injection attacks.

By the end of the course, you’ll have built a mini-bank application that tracks users’ financial transactions over time, allowing them to view their history over time.

All the code and supporting files for this course are available on Github at https://github.com/PacktPublishing/-Learn-Rust-in-7-Days

Downloading the example code for this course: You can download the example code files for all Packt video courses you have purchased from your account at http://www.PacktPub.com. If you purchased this course elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

Table of Contents

  1. Chapter 1 : Getting Started with Basic Tools and Syntax
    1. The Course Overview 00:05:44
    2. Get Rust Working on Your Machine 00:04:19
    3. Introducing Standard Rust Operators and Syntax 00:07:17
    4. Basic Loops 00:08:55
    5. Basic Strings 00:07:44
    6. Structs and Methods 00:07:26
    7. Enums and Pattern Matching 00:09:12
    8. Result and Option Types 00:09:02
    9. Assignment 00:02:18
  2. Chapter 2 : Traits
    1. Introduction to Traits 00:03:55
    2. Using Other People’s Libraries 00:05:44
    3. Defining Our Own Traits 00:08:55
    4. Accepting Generic Parameters 00:08:25
    5. Generic Structs 00:08:10
    6. Generic Iterators 00:08:48
    7. Useful traits 00:06:34
    8. Error Handling with the from Trait 00:10:37
    9. Documenting and Publishing Your Library 00:08:03
    10. Assignment 00:10:40
  3. Chapter 3 : Lifetimes
    1. Why Lifetimes Matter? 00:09:20
    2. Passing a Borrow Forward 00:07:30
    3. Stack versus Heap - Box and the Deref Trait 00:09:06
    4. The Static Lifetime 00:06:30
    5. Reference Counting 00:07:17
    6. Assignment 00:07:23
  4. Chapter 4 : The Program Environment
    1. Environment Variables 00:05:29
    2. Calling Other Programs 00:06:06
    3. Piping Between Other Programs 00:04:39
    4. Files Access 00:04:24
    5. Assignment 00:04:48
  5. Chapter 5 : Threads and Channels
    1. Threads 00:03:58
    2. Channels 00:07:15
    3. Mutexes 00:06:34
    4. Thread Pools and Worker 00:14:11
    5. Rayon for Embarrassingly Parallel Problems 00:07:50
    6. Assignment 00:02:51
  6. Chapter 6 : Databases
    1. Introduction to SQLite 00:06:00
    2. Secure Passwords 00:06:18
    3. Adding to the Database 00:08:48
    4. Retrieving from the Database 00:08:51
    5. Assignment 00:04:36
  7. Chapter 7 : Building Our Database into an Online Banks
    1. Introduction to Rocket 00:07:45
    2. HTML Templates with Maud 00:05:08
    3. Managing Sessions 00:07:39
    4. Web Login 00:14:17
    5. Accessing Sessions 00:10:59
    6. Assignment 00:00:57