Skip to content

A serie of tutorials on rust, for teaching purposes

License

Notifications You must be signed in to change notification settings

fimbault/rust_tuto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🦀 tutorial

A serie of tutorials on rust, for teaching purposes

  • basic_syntax : implement 4 functions to protect you from covid (wear_mask, keep_distance, wash_hands, get_tested)
  • mut : examples related to mutability
  • ownership-pluralize : a step-by-step approach to ownership

Those examples correspond to what is most surprising to newcomers to rust. The main idea is that one needs to find ways around patterns such as:

let a = assign 
function(a)
reassign a or reuse a

how to start

To really learn rust, I suggest:

  • rustlings : the exercices are a great intro to the syntax. Don't hesitate to look at the rust book as soon as you need, but it's good to learn by trying. To use rustlings, clone the repository, run rustling watch in a command window, and start working on the first exercice with your favorite IDE (the name of the exercice is provided in the window). Use the hints if needed.
  • adventofcode is a good way to get into real problem solving (and can work for any language). See adventofcode-rs for my solutions in rust. The challenge happens in december (one challenge per say), but you can reuse past editions to start anytime.

In case you want to debug from vscode, please see this gist. I also recommend the rust analyzer extension.

and then what?

Focus on more advanced topics or what's specific to rust, as well as frameworks or environments (ex: no_std) you'll use.

  • lifetimes: this video is a great introduction
  • combining errors: often an issue when you're just trying to make things work
  • serde: for serialization/deserialization
  • async
  • web
  • wasm
  • ffi
  • embedded

About

A serie of tutorials on rust, for teaching purposes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages