Code Monkey home page Code Monkey logo

rustlings's Introduction

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 playground!

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

If you need more help or would like to compare solutions, you can ask in #rust-beginners 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

If

Relevant chapter in The Rust Programming Language

Strings

Relevant chapter in The Rust Programming Language

Move semantics

These exercises are adapted from pnkfelix's Rust Tutorial -- thank you Felix!!!

Relevant chapters in the book:

Note that the exercises in this section may look similar to each other but they are subtly different :)

Modules

Relevant chapter in The Rust Programming Language

Standard library types

Result

The Error Handling and Generics sections are relevant.

Arc

The Concurrency section is relevant.

Threads

See the Dining Philosophers example and the Concurrency Chapter from the book.

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!
  • How could the process of doing these exercises work better? This is an open-ended question :) Are the playground links good enough? Are there ways that we could make going to the next exercise easier without forking the playgound??

rustlings's People

Contributors

carols10cents avatar douglascorrea avatar jonathantorres avatar sudonym1 avatar

Watchers

Piotr Kacprzak avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.