Rust Programming

Rust is an intriguing language. Syntactically similar to C++, it offers higher-order language features to simplify important tasks such as memory management, concurrent execution, and safe vs. unsafe execution.

This course will help you understand what Rust applications look like, how to write Rust applications properly, and how to get the most out of the language and its libraries.

Duration

4 days

 

Prerequisites

  • Experience with C/C++ or a similar programming language such as Go or Java

What you'll learn

  • Creating, building, and running Rust applications
  • Organizing Rust code and application structure properly
  • Managing memory safely and effectively
  • Using object-oriented techniques
  • Using functional programming techniques
  • Implementing concurrency
  • Exploring additional Rust techniques

Course details

Getting Started with Rust

  • What is Rust
  • What can I do with Rust
  • What tools do I need for Rust

Rust Language Essentials

  • Types and variables
  • Conditional logic
  • Iteration
  • Functions
  • Collections

Organizing Rust Code

  • Modules
  • Packages
  • Crates
  • Using the Cargo dependency manager and build tool

Error Handling

  • Overview
  • Recoverable errors
  • Unrecoverable errors

Object Orientation

  • Defining structures
  • Implementing functionality
  • Specifying traits
  • Design patterns

Functional Programming

  • Concepts
  • Anonymous functions
  • Closures
  • Patterns and techniques

Memory Management

  • What memory management problems does Rust solve
  • Managing the stack and the heap
  • Unsafe Rust

Ownership

  • The concept of ownership in Rust
  • References
  • Borrowing
  • Slices

Smart Pointers

  • The role of smart pointers in Rust
  • Using Box, Deref, and Drop
  • Using Rc and RefCell

Concurrency

  • Overview of concurrency in Rust
  • Creating threads
  • Defining actors and passing messages
  • Accessing shared data safely

Testing

  • Types of tests
  • Writing tests
  • Running tests
  • Test techniques

Tour of Additional Rust Techniques

  • Embedded systems
  • Data analysis
  • Database access