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 :)
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!
Relevant chapter in The Rust Programming Language
Relevant chapter in The Rust Programming Language
Relevant chapter in The Rust Programming Language
Relevant chapter in The Rust Programming Language
The Error Handling and Generics sections are relevant.
A few exercises based on things I've encountered or had trouble with getting used to.
- 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