Skip to content

augusto-mantilla/rust-exercises

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Check out the book

Rust book

If you prefer to learn by example

Rust by Example

Clone this repo and complete the exercises

  • Run: cargo test to check your solution

Content Structure

Variables and Definitions (Quest 1 -> 1 day)

Total: 11

Variables (Scalar type), control flow (if, while, loop, for), functions

Defining and using the basic types with simple functions

Tuples:

Practicing tuple definition, accessing, destructuring and matching

Memory Management (Quest 2 -> 1 days)

Total: 11

Ownership

Understanding the ownership rules and how to deal with different types of data

References

Both

Complex Data Structures (Quest 3 -> 2 days)

Total: 12

Structs

Enums

Array

Strings

HashMaps

Methods

Error Handling (Quest 4 -> 1 day)

Total: 8

unwrap and expect

Panic

Option

Result<T,E>

Multiple error types

Packages, Crates and modules (Quest 5 -> 1 day)

Total: 6 Learning how to organize projects separating them into components (packages and modules), unit testing and importing crates

Generic Types, Traits and Lifetimes (Quest 6 -> 2 days)

Total: 15 Using generics to create flexible data structures, creating polymorphic code using traits and learning to deal with references through lifetimes

Generics

Traits

Lifetimes

Smart Pointers (Quest 7 -> 1 day)

Total: 6

(Rc refence counter, constructing a graph using the linked list done above)

(RefCell and Cell)

(Drop for box deallocates the memory that was allocated when it was created)

Functional Languages Features (Quest 8 -> 2 days)

Total: 9

Closures

Curry

Higher-order-functions

Iterators

Pattern Matching (Quest 9 -> 1 day)

Pattern matching syntax

About

Exercises to learn and practice Rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages