Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Microsoft

Take your first steps with Rust

Microsoft via Microsoft Learn

Overview

  • Module 1: A quick introduction to Rust language features and how Rust compares with other programming languages.
  • In this module, you'll:

    • Get a brief introduction to Rust.
    • Discover why developers choose Rust over other programming languages.
    • Understand the basic components and tools for using Rust.
    • Try working with code in the Rust playground.
  • Module 2: Learn how to set up the Rust development environment, write a program, and use the Cargo build system.
  • In this module, you will learn how to:

    • Set up your development environment for using Rust.
    • Write a simple "Hello, world!" program.
    • Use Cargo, Rust's build tool and dependency manager.
  • Module 3: Learn about Rust concepts, including variables, data types, and functions.
  • In this module, you will:

    • Explore core Rust language concepts, including functions, data types, and variables
    • Understand basic Rust types for text, numbers, boolean values, and compound data
    • Create, compile, and run a basic Rust program
    • Discover how to print output from your program
  • Module 4: Explore Rust compound data types like arrays, vectors, and hash maps. Discover how to use if/else statements to test conditions.
  • In this module, you will:

    • Explore Rust compound data types: arrays and vectors
    • Discover how to use if/else statements to test conditions in a Rust program
    • Create, compile, and run a Rust program to process compound data and test values
  • Module 5: Explore how to use hash maps in Rust. Discover how to use loop expressions to iterate through data.
  • In this module, you will:

    • Discover the hash map data type in Rust, and how to access keys and values
    • Explore how to use loop expressions to iterate through data in a Rust program
    • Create, compile, and run a Rust program to iterate on hash map data by using a loop
  • Module 6: In this module, you'll learn about ways to handle errors in Rust.
  • In this module, you'll learn how to:

    • Use panic! to deal with unrecoverable errors.
    • Use the Option enum when a value is optional or the lack of a value is not an error condition.
    • Use the Result enum when things could go wrong and a caller might have to deal with the problem.
  • Module 7: Discover the features that make Rust so unique: ownership and borrowing.
  • In this module, you'll learn:

    • The concept of ownership in Rust.
    • Moving and borrowing values.
    • Scoping rules and lifetimes.
    • Rust's pointer types, commonly called references.
  • Module 8: Understand what generic types and traits are and how to use them in Rust.
  • In this module, you'll learn:

    • What generic types are and how "wrapper" types use them.
    • What traits are and how they help us define shared behavior.
    • How to implement an existing trait for a custom type.
    • How to implement a custom trait for an existing type.
    • How trait bounds help us write generic functions.
    • How to implement an Iterator trait to iterate through collections.
  • Module 9: Learn about how to effectively use modules and how to integrate with packages and third-party crates.
  • In this module, you'll learn:

    • How to organize your code in files, modules, and packages.
    • How those concepts interact.
    • How to use third-party packages from the Crates.io repository.
  • Module 10: Learn about the types of testing you can do with Rust.
  • In this module, you'll learn:

    • How to write unit tests.
    • How to write integration tests.
    • How to write documentation tests.
  • Module 11: Create a Rust command-line program to manage to-do list items.
  • In this module, you'll learn:

    • How to develop a real-world command-line program by using tested third-party crates for command-line parsing and error handling.

Syllabus

  • Module 1: What is Rust
    • Introduction
    • What is Rust?
    • Unique features of Rust
    • The Rust playground
    • Exercise
    • Summary
  • Module 2: Set up the Rust development environment
    • Introduction
    • Install Visual Studio Code
    • Install Visual C++ build tools
    • Install Rust
    • Exercise: Hello World
    • Summary
  • Module 3: Create your first Rust program
    • Introduction
    • Understand the basic Rust program structure
    • Create and use variables in Rust
    • Explore data types for numbers, text, and true/false values
    • Define data collections by using tuples and structs
    • Use enum variants for compound data
    • Work with functions in Rust
    • Exercise: Write a function to build a car
    • Summary
  • Module 4: Test conditions with if/else expressions in Rust
    • Introduction
    • Create and use arrays
    • Explore the vector data type
    • Exercise: Work with compound types
    • Use if/else conditions
    • Exercise: Work with if/else conditions
    • Summary
  • Module 5: Use loops to iterate through data in Rust
    • Introduction
    • Work with hash maps
    • Exercise: Use a hash map to track orders
    • Use for, while, and loop expressions
    • Exercise: Use a loop to iterate on data
    • Summary
  • Module 6: Handle errors in Rust
    • Introduction
    • Learn about fatal errors with panic!
    • Use the Option type to deal with absence
    • Exercise - Use the Option type to deal with absence
    • Use the Result type to handle errors
    • Exercise - Use the Result type to handle errors
    • Knowledge check
    • Summary
  • Module 7: Understand how Rust manages memory
    • Introduction
    • What is ownership?
    • Learn about borrowing
    • Validate references by using lifetimes
    • Exercise - Lifetimes
    • Knowledge check
    • Summary
  • Module 8: Implement generic types and traits
    • Introduction
    • What are generic data types?
    • Define shared behavior with traits
    • Use the derive trait
    • Use trait bounds and generic functions
    • Use iterators
    • Exercise - Implement a generic type
    • Exercise - Implement an iterator
    • Knowledge check
    • Summary
  • Module 9: Explore modules, packages, and third-party crates
    • Introduction
    • Understand concepts behind code organization
    • Split code into modules
    • Separate modules into different files
    • Add third-party crates to your project
    • Exercise - Visibility
    • Exercise - Modules
    • Knowledge check
    • Summary
  • Module 10: Write automated tests
    • Introduction
    • Write unit tests
    • Exercise - Write unit tests
    • Write documentation tests
    • Exercise - Write documentation tests
    • Write integration tests
    • Knowledge check
    • Summary
  • Module 11: Build a command-line to-do list program
    • Introduction
    • Outline the application
    • Create the CLI module
    • Create the tasks module
    • Write a function that adds tasks
    • Write a function that completes tasks
    • Write a function that prints tasks
    • Complete the main module
    • Use a default journal file to store tasks
    • Display friendly error messages
    • Knowledge check
    • Summary

Reviews

Start your review of Take your first steps with Rust

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.