Go to file
Carol (Nichols || Goulding) 2a23eaced6 Add some exercises about tests!
2015-09-20 18:31:41 -04:00
functions Just remembered another function one I wanted to do 2015-09-18 20:28:27 -04:00
modules Add module exercises from jdm! 🎉 2015-09-17 22:21:56 -04:00
primitive_types Start some primitive types exercises 2015-09-18 21:10:16 -04:00
standard_library_types Add jdm's Result exercise!! 😹 2015-09-18 21:27:25 -04:00
strings Add some exercises about Strings and &strs! 2015-09-20 18:03:00 -04:00
tests Add some exercises about tests! 2015-09-20 18:31:41 -04:00
variables Add hints to the variable bindings exercises 2015-09-17 19:16:30 -04:00
ex1.rs Create ex1.rs 2015-09-14 22:26:11 -04:00
ex2.rs Create ex2.rs 2015-09-14 22:26:38 -04:00
ex3.rs Create ex3.rs 2015-09-14 22:26:58 -04:00
ex4.rs Create ex4.rs 2015-09-15 20:29:05 -04:00
ex5.rs Create ex5.rs 2015-09-16 09:49:09 -04:00
LICENSE Initial commit 2015-09-14 22:25:18 -04:00
README.md Add some exercises about tests! 2015-09-20 18:31:41 -04:00

rustlings

Small exercises to get you used to reading and writing Rust code. Includes practice reading and responding to compiler messages!

This repo is very much the smallest thing that could possibly work :)

To do these exercises

Thanks to btbytes' prlinks, you can now click on the links below to load the exercises in the rust playpen!

There are infinite correct answers-- the exercises are sometimes left very open-ended. Scroll down in the playpen to find comments that have hints.

If you need more help or would like to compare solutions, you can ask in #rust on irc.mozilla.org, the user forum, or the subreddit. If an exercise could be improved in any way, please create an issue or submit a pull request!

Variable bindings

Relevant chapter in The Rust Programming Language

Functions

Relevant chapter in The Rust Programming Language

Primitive types

Relevant chapter in The Rust Programming Language

Tests

Going out of order from the Syntax and Semantics section of the book to cover tests-- many of the following exercises will ask you to make tests pass!

Testing chapter from the Effective Rust section of the book

Strings

Relevant chapter in The Rust Programming Language

Modules

Relevant chapter in The Rust Programming Language

Standard library types

Result

The Error Handling and Generics sections are relevant.

Uncategorized

A few exercises based on things I've encountered or had trouble with getting used to.

To help with this repo/TODO list

  • File issues for problems or suggestions!
  • Contribute more exercises! Anything that took you time to get used to, or that you had trouble with, or that deserves practice would be a good exercise!
  • Organize the exercises (by topic? progression of difficulty?)
  • Add some exercises that are "make the test pass" instead of "make this compile"
  • Write some hints or sample answers
  • Figure out a nice way to link the code directly into playpen