# Rust: Ownership without Tears Example code and exercises for the glibCode course **[Rust: Ownership without Tears](https://glibcode.net/courses/rust-ownership/)** (Intermediate, about 11 hours). Ownership, borrowing and lifetimes, explained with pictures and fixed compiler errors, until the borrow checker feels like a friend. ## Lessons | # | Lesson | Code | | --- | --- | --- | | 1 | Hello, Cargo | [`lessons/01-hello-cargo`](lessons/01-hello-cargo/) | | 2 | Ownership: who frees the memory | [`lessons/02-ownership-who-frees-the-memory`](lessons/02-ownership-who-frees-the-memory/) | | 3 | Borrowing and references | [`lessons/03-borrowing-and-references`](lessons/03-borrowing-and-references/) | | 4 | Slices | [`lessons/04-slices`](lessons/04-slices/) | | 5 | Structs and enums | [`lessons/05-structs-and-enums`](lessons/05-structs-and-enums/) | | 6 | Pattern matching | [`lessons/06-pattern-matching`](lessons/06-pattern-matching/) | | 7 | Error handling with Result | [`lessons/07-error-handling-with-result`](lessons/07-error-handling-with-result/) | | 8 | Lifetimes demystified | [`lessons/08-lifetimes-demystified`](lessons/08-lifetimes-demystified/) | | 9 | Traits and generics | [`lessons/09-traits-and-generics`](lessons/09-traits-and-generics/) | ## Getting started ```sh git clone https://git.glibcode.net/glibcode/rust-ownership.git cd rust-ownership ``` Rust from [rustup.rs](https://rustup.rs). Every lesson is its own Cargo project. Questions? Ask in the course forum or write to help@glibcode.net. ## License The code is MIT licensed (see `LICENSE`). The lesson texts are © glibCode.