Video description
This course begins by guiding you through the essential setup process, helping you configure your environment on macOS or Windows, and crafting your first Rust project. From there, you'll master variables, data types, and control flow, ensuring a solid understanding of Rust's syntax and semantics.
As you progress, explore Rust's innovative concepts like ownership, borrowing, and lifetimes. These principles, combined with lessons on enums, generics, and error handling, will enhance your ability to write efficient, bug-free code. Delve into Rust's memory safety guarantees without sacrificing performance, learning to leverage features like the Option and Result enums for error management.
Finally, unlock Rust's advanced capabilities by building modules, working with traits, and understanding lifetimes. Gain the confidence to design scalable and maintainable projects, culminating in a robust understanding of the language. With clear explanations and hands-on exercises, this course ensures you are well-equipped to thrive in Rust's growing ecosystem.
To access the supplementary materials, scroll down to the 'Resources' section above the 'Course Outline' and click 'Supplemental Content.' This will either initiate a download or redirect you to GitHub.
What you will learn
- Set up a Rust development environment on macOS or Windows
- Write, compile, and run Rust programs
- Master key Rust concepts like ownership, borrowing, and lifetimes
- Use enums, traits, and generics to build modular, reusable code
- Implement effective error handling with Option and Result enums
- Create efficient, memory-safe applications leveraging Rust's advanced features
Audience
This course is ideal for developers eager to learn Rust, whether transitioning from another programming language or starting fresh. Basic programming experience is recommended but not required. A willingness to learn new paradigms and tools is essential.
About the Author
Boris Paskhaver : Boris Paskhaver is a New York City-based software engineer, author, and Udemy instructor with a unique journey into tech. Graduating from NYU in 2013 with a degree in Business Economics and Marketing, he initially worked in various roles, including business analyst and data analyst, at several companies. His coding journey began accidentally while building projects with Python and JavaScript, leading him to passionately pursue programming. Without formal computer science education, Boris completed App Academy's full-stack web development bootcamp, diving headfirst into web development. As an instructor, Boris focuses on creating comprehensive, easy-to-understand courses, addressing the challenges he faced learning to code. He's driven by the intersection of technology and education, aiming to make programming accessible to all. Boris brings this passion to his teaching, helping others unlock the potential of coding.
Table of contents
-
Chapter 1 : Getting Started
- Intro to Rust
- The Rust Compiler
- [macOS] Intro to Terminal
- [macOS] Installing XCode Command Line Tools
- [macOS] Installing Rust
- [macOS] Installing Visual Studio Code
- [macOS] Add VSCode to PATH
- [Windows] Intro to PowerShell
- [Windows] Find Out Your Windows Operating System
- [Windows] Installing Visual Studio
- [Windows] Installing Rust
- [Windows] Installing Visual Studio Code
- Updating or Uninstalling Rust with rustup
- Create Rust Project with Cargo
- Hello World
- Compiling and Running Rust File from the Terminal
- Formatting with rustfmt and cargo fmt
- The cargo build Command
- The cargo run Command
- The cargo check Command
- Comments
- Section Review
- Chapter 2 : Variables and Mutability
-
Chapter 3 : Data Types
- Intro to Data Types
- Integers
- Using _ as Visual Separator for Numbers
- The usize and isize Types
- Strings and Raw Strings
- Intro to Methods
- Floating Point Types
- Formatting Floats with Format Specifier
- Casting Types with the as Keyword
- Math Operations
- Augmented Assignment Operator
- Intro to Booleans
- Boolean Inversion with !
- Equality and Inequality Operators
- And Logic with
- Or Logic with
- The Character Type
- The Array Type
- Reading and Writing Array Elements
- The Display Trait
- The Debug Trait
- The dbg! Macro
- The Tuple Type
- Ranges and Range Iteration
- Intro to Generics
- Section Review
- Chapter 4 : Functions
- Chapter 5 : Control Flow
-
Chapter 6 : Ownership
- Intro to Ownership
- The Stack and Heap
- Scope and Ownership
- The Copy Trait
- The String Type
- The push_str Method on a String Type
- Moves and Ownership
- The drop Function
- The clone Method
- References and Borrowing
- The Dereference Operator
- String, , str, and
- The Copy Trait with References
- Ownership and Function Parameters
- Mutable Parameters
- Return Values I
- Return Values II
- Section Review
- Chapter 7 : References and Borrowing
- Chapter 8 : Slices
-
Chapter 9 : Structs
- Define a Struct
- Create a Struct Instance
- Access Struct Fields
- Overwrite Struct Fields
- Create Structs in a Function
- Struct Field Initialization Shorthand Syntax
- Struct Update Syntax
- Passing Structs into a Function
- Deriving Debug Trait for Struct
- Defining Struct Methods
- self Parameter as Mutable Struct Instance
- self Parameter as Immutable and Mutable References to Struct Instance
- Methods with Multiple Parameters
- Calling Methods from Other Methods
- Associated Functions
- Multiple impl Blocks
- Builder Pattern
- Tuple Structs
- Unit-Like Structs
- Section Review
-
Chapter 10 : Enums
- Intro to Enums
- Enum with Associated Values I
- Enum with Associated Values II
- A Brief Discussion on Enum Memory
- Struct Variants
- Nesting Enums in Enums
- The match Keyword I
- The match Keyword II
- The match Keyword III
- Defining Methods on Enums
- The match Keyword IV - Catching Multiple Values
- The match Keyword V - match with Exact Value
- The if let Construct
- Section Review
- Chapter 11 : Generics
-
Chapter 12 : Option and Result Enums
- The Option Enum
- Real Example of Option Enum (The get Method on an Array)
- The unwrap and expect Methods
- The match Keyword with Option Enum
- Returning an Option Enum from a Function
- Top-Level Option Variants
- The unwrap_or Method
- Building Option from Scratch
- The Result Enum
- Real Example of Result Enum (The parse Method on a String)
- Returning a Result Enum from a Function
- Result Methods
- Nuances of unwrap Method on Result
- Section Review
- Chapter 13 : Vectors
-
Chapter 14 : Project Structure
- Packages and Crates
- Intro to Modules
- The pub Keyword
- The Benefit of Namespaces
- Module as File
- Module as Folder
- Module Ambiguity
- Public Enums, Public Structs, and Public Fields
- Submodules
- The crate Prefix
- The use Keyword I
- The use Keyword II (Name Conflicts)
- The self Keyword
- The super Keyword
- Create Aliases with the as Keyword
- Using pub use to Export Names from Submodules
- External Crates
- The Standard Library
- The Glob Operator
- Create Library Crate
- Multiple Binary Crates
- Documentation Comments
- Walking Through Sample Module Structure
- Section Review
- Chapter 15 : Strings
- Chapter 16 : HashMaps
-
Chapter 17 : Error Handling
- The panic! Macro
- The process Module and the exit Function
- Standard Error (eprintln! Macro)
- Opening a File
- Asking the User for Input
- Reading the File's Contents
- Propagating Errors
- Understanding Error Type Redeclaration
- The ? Operator
- The read_to_string Associated Function
- Using ? with Option
- Section Review
-
Chapter 18 : Traits
- Intro to Traits
- Defining a Trait
- Implementing Trait for Struct I
- Implementing Trait for Struct II
- Default Implementations
- Calling Trait Method from Another Method
- Traits for Function Parameter Constraints
- Trait Bound Syntax
- Multiple Trait Bounds
- where Clauses
- Traits as Function Return Values
- Trait Bounds to Conditionally Implement Methods
- A Preview of Trait Objects
- Trait Must be In Scope to Use its Definitions
- Moving to Project Structure I
- Moving to Project Structure II (Multiple Modules)
- Associated Constants in a Trait
- Getters in Traits
- Setters in Traits
- Supertraits I (Trait Inheritance)
- Traits with Generics
- Implementing the Display Trait on a Struct
- Implementing the Display Trait on an Enum
- Implementing the Debug Trait
- Formatter Methods
- Implementing the Drop Trait
- Implementing the Clone Trait
- Implementing the Copy Trait
- Implementing the PartialEq Trait for Structs
- Defining Equality for Different Types
- Implementing the PartialEq Trait for Enums
- Implementing the Eq Trait
- Implementing the PartialOrd Trait
- Associated Types I
- Associated Types II
- Section Review
-
Chapter 19 : Lifetimes
- Concrete Lifetimes for Values I
- Concrete Lifetimes for Values II
- Concrete Lifetimes for References
- Non-Lexical Lifetimes
- Invalid Lifetimes I
- Invalid Lifetimes II
- Functions Cannot Return References to Owned Values or Parameters
- References as Function Parameters
- Intro to Generic Lifetimes
- Lifetimes and Referents
- Lifetime Elision Rules I
- Multiple Parameters I
- Multiple Parameters II
- Lifetime Elision Rules II
- Lifetimes in Structs
- Multiple Lifetimes
- The static Lifetime
- Section Review
- Chapter 20 : Congratulations
Product information
- Title: Learn to Code with Rust
- Author(s):
- Release date: November 2024
- Publisher(s): Packt Publishing
- ISBN: 9781837024155
You might also like
video
Clean Code Fundamentals
Expanded Edition (Updated February 2022) Updated with episodes from SOLID Principles and Advanced TDD in the …
video
Modern JavaScript from the Beginning - Second Edition
This course is a comprehensive introduction to JavaScript, covering everything from the basics of variables, data …
video
React - The Complete Guide (Includes Hooks, React Router, and Redux) - Second Edition
**This course is now updated for React 18** Starting with an introduction to React concepts, you …
book
Build a Large Language Model (From Scratch)
Learn how to create, train, and tweak large language models (LLMs) by building one from the …