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

Coursera

Memory Safety and Structuring Programs

Packt via Coursera

Overview

Coursera Flash Sale
40% Off Coursera Plus for 3 Months!
Grab it
This course features Coursera Coach! A smarter way to learn with interactive, real-time conversations that help you test your knowledge, challenge assumptions, and deepen your understanding as you progress through the course. Rust is renowned for its ability to ensure memory safety without a garbage collector, and this course will equip you with the tools to navigate Rust's ownership model, references, borrowing, and more. Through practical examples and in-depth explanations, you’ll gain hands-on experience managing memory safely while structuring your programs effectively. By the end of this course, you’ll understand the foundational concepts like ownership, borrowing, and references and be able to apply them to write memory-efficient, safe programs in Rust. The course begins with an introduction to ownership and its significance in Rust's memory management, followed by a deep dive into references and borrowing. You'll learn how to efficiently handle data and manage memory through concepts like slices, structs, enums, and generics. In addition, you’ll explore Option and Result enums for managing errors and optional values, ensuring that you write reliable and safe applications. This course is ideal for intermediate programmers who want to enhance their understanding of memory management and safety in systems programming. It is perfect for developers interested in learning Rust or transitioning from other languages.

Syllabus

  • Ownership
    • In this module, we will introduce Rust’s ownership model and explain how it ensures memory safety. You will explore how Rust manages memory using the stack and heap and learn about moving ownership, borrowing, and how these concepts influence function parameters and return values.
  • References and Borrowing
    • In this module, we will dive into references and borrowing in Rust. You will explore how Rust’s ownership model allows safe sharing of data through references, and how it prevents issues like dangling references. Practical examples will help reinforce these important concepts.
  • Slices
    • In this module, we will explore how slices are used in Rust to provide efficient, safe access to parts of data structures. You will learn to work with string and array slices, using them in functions and manipulating data safely and efficiently.
  • Structs
    • In this module, we will introduce you to structs in Rust, focusing on how they are used to structure related data. You will learn about methods, updating struct instances, and organizing your code with impl blocks, applying your knowledge in a hands-on project.
  • Enums
    • In this module, we will explore Rust’s enums and how they allow you to represent flexible and complex data. You will learn about pattern matching, methods on enums, and how to use them in practical applications to simplify your code.
  • Generics
    • In this module, we will introduce you to generics in Rust and explain how they allow for flexible, reusable code. You will explore their use in functions, structs, and enums, applying these concepts in a hands-on project to reinforce your learning.
  • Option and Result Enums
    • In this module, we will cover Rust's Option and Result enums for handling optional and error-prone values. You will learn how to use pattern matching and practical methods to safely manage data, building your skills through a hands-on project.

Taught by

Packt - Course Instructors

Reviews

Start your review of Memory Safety and Structuring Programs

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.