Skip to main content

Rust Essentials

Executive Summary

A hands-on, beginner-friendly 3-day course covering Rust fundamentals, safe coding practices, and core language features—perfect for developers ready to add Rust to their toolkit.

Productive tech team collaborating

Course Details

This course introduces participants to the Rust programming language and helps students learn its basics. This beginner-friendly course is hands-on, and it covers important ideas like ownership, borrowing, and lifetimes. These concepts and skills help students write safe and efficient code.

Participants will learn to create custom data structures, build tools, and will work with pattern matching and use Rust's modern features.

If you are an experienced software developer wanting to learn Rust, this course is for you. It provides important knowledge. This will help you become skilled in a popular and innovative programming language.

Objectives

  • Understand the Rust Philosophy
  • Set Up and Navigate the Rust Environment
  • Grasp Basic Rust Syntax and Semantics
  • Learn Control Flow and Logic
  • Learn Ownership and Borrowing Concepts
  • Utilize Tuples, Enums, Structs, and Vectors
  • Employ Pattern Matching

Duration

14 hours of live instruction delivered according to clients' scheduling needs. Includes recordings, full environment setup, and optional local development instructions.

Request Information

Course Outline

Introduction to Rust
What is Rust?
• Rust's philosophy and goals
• History and motivation
• Rust community and ecosystem
• The Rust Playground

Setting Up Rust
• Installing via script, Homebrew, or platform installers
• Setting up Rust with rustup
• Updating and managing toolchains
• Introduction to Cargo (Rust’s package manager)

Development Environment
• VSCode with Rust extensions
• Rust Rover overview
• Debugging Rust in VSCode
• Using GitHub Copilot with Rust

Rust Fundamentals
• Hello World: main function and printing
• Comments and syntax basics
• Scalar and compound data types
• Constants, mutability, and variable shadowing
• Control flow: if, loop, while, for

Ownership & Borrowing
• Understanding ownership rules
• Borrowing vs mutable borrowing
• Lifetimes and scope
• Stack vs heap memory in Rust
• Common compiler errors explained

Functions & Modules
• Declaring and calling functions
• Function parameters and return values
• Organizing code with mod, use, and pub
• Creating and importing modules

Structs & Enums
• Defining and instantiating structs
• Tuple structs and struct update syntax
• Defining enums and pattern matching
• The Option and Result types

Collections & Error Handling
• Using vectors and strings
• HashMaps and basic collection operations
• Error handling with match, unwrap, and ?
• Writing robust error-handling logic

Project Workflows & Tools
• Using Cargo commands: build, run, check, test
• Dependency management with Cargo.toml
• Creating and publishing crates
• Writing and running tests in Rust

Functions
• Define a Function
• Call a Function
• Parameter Types
• Return Types
• Closure Functions

Modules
• Import Modules from Standard Library
• Import Modules from Third-Party Crates
• Define Custom Modules
• Import Custom Modules

Built-In Macros
• print! and println!
• format!
• vec!
• include_str! and include_bytes!
• cfg! and env!
• panic!

 

Memory Management
Problems with Manual Management
• Problems with Garbage Collection

Ownership & Borrowing
• References
• Lifetimes

Strings and String Slices
• What is a String and a String Slice?
• String Slices
• String Objects
• Convert Between Slices and Strings
• Parse Number from String
• Trim String
• Print Strings with Interpolation

Tuples
• What is a Tuple?
• Heterogeneous Elements
• Access Elements
• Destructuring
• Immutable

Enums
• What is an Enum?
• Define an Enum
• Using Enums
• Enum Variants
• Enum Methods
• Enums and Pattern Matching
• Result Enum
• Option Enum
• Enums vs Structs

Structs
• What is a Struct?
• Create Instance
• Field Init Shorthand
• Struct Update Syntax
• Tuple Structs
• Unit-Like Structs
• Ownership of Struct Data
• Function Implementation
• Associated Functions
• Struct Methods
• Constructor Pattern

Vectors
What is a Vector?
• Create a Vector
• Add and Remove Elements
• Access Elements
• Iteration and Iterators
• Iterate over Elements
• Slicing, Length, and Capacity
• Common Vector Operations
• Understand Memory Management
• Ownership and Borrowing Rules

Pattern Matching
• What is Pattern Matching?
• Match Statement
• If Let Statement
• While Let Statement
• Destructuring Structs and Tuples
• Pattern Matching with Enums
• Pattern Matching with Functions
• Pattern Matching and Ownership
• Refutability and Irrefutability

Prerequisite

  • Software development experience, this is not a general introduction to programming course.
  • Basic understanding of programming concepts such as variables, expressions, functions, and control flow.

Training Materials

All students receive comprehensive courseware covering all topics in the course. Courseware is distributed via GitHub in the form of documentation and extensive code samples. Students practice the topics covered through challenging hands-on lab exercises.