|
1 | 1 | # rustlings
|
2 | 2 |
|
3 |
| -Greetings and welcome to rustlings. This project contains small exercises to get you used to reading and writing code. This includes reading and responding to compiler messages! |
| 3 | +Greetings and welcome to `rustlings`. This project contains small exercises to get you used to reading and writing Rust code. This includes reading and responding to compiler messages! |
4 | 4 |
|
5 |
| -## How to get started |
| 5 | +Alternatively, for a first-time Rust learner, there's several other resources: |
6 | 6 |
|
7 |
| -To use rustlings you need to have a [Rust](https://www.rust-lang.org/) toolchain installed. To install it go to [rustup.rs](https://rustup.rs/). |
| 7 | +- [The Book](https://doc.rust-lang.org/book/index.html) - The most comprehensive resource for learning Rust, but a bit theoretical sometimes |
| 8 | +- [Rust By Example](https://doc.rust-lang.org/rust-by-example/index.html) - Learn Rust by solving little exercises! It's almost like `rustlings`, but online |
8 | 9 |
|
9 |
| -Once Rust is installed, clone the rustlings repository and enter the resulting directory: |
| 10 | +## Getting Started |
| 11 | + |
| 12 | +To use `rustlings` you need to have [Rust](https://www.rust-lang.org/) installed on your computer. To install Rust, go to [rustup.rs](https://rustup.rs/). |
| 13 | + |
| 14 | +Once Rust is installed, clone the `rustlings` repository and enter the resulting directory: |
10 | 15 |
|
11 | 16 | ```bash
|
12 | 17 | git clone https://github.com/rustlings/rustlings.git
|
13 | 18 | cd rustlings
|
14 | 19 | ```
|
15 | 20 |
|
16 |
| -Once in the directory you can install rustlings on your machine and run exercises: |
| 21 | +Once in the directory you can install `rustlings` on your machine and run the introduction: |
17 | 22 |
|
18 | 23 | ```bash
|
19 | 24 | cargo install --path .
|
20 |
| -rustlings <command> |
21 |
| -``` |
22 |
| - |
23 |
| -Or run rustlings directly with cargo, without installing it: |
24 |
| - |
25 |
| -```bash |
26 |
| -cargo run <command> |
| 25 | +rustlings |
27 | 26 | ```
|
28 | 27 |
|
29 |
| -If you choose to not install rustlings, just replace `rustlings` with `cargo run` in the rest of this text. |
| 28 | +If you choose to not install the `rustlings` command, just replace `rustlings` with `cargo run` in the rest of this text. |
30 | 29 |
|
31 | 30 | ## Doing exercises
|
32 | 31 |
|
33 |
| -The exercises are sorted by topic and can be found in the subdirectory `rustlings/exercises/<topic>`. For every topic there is an additional README file with some resources to get you started on the topic. We really recommend, that you have a look at them before you start. |
34 |
| - |
35 |
| -For every topic there is an additional README file with some resources to get you started on the topic. We really recommend, that you have a look at them before you start. |
36 |
| - |
37 |
| -Your task is simple. Every exercise contains an error you have to solve, in order to make it compile. |
| 32 | +The exercises are sorted by topic and can be found in the subdirectory `rustlings/exercises/<topic>`. For every topic there is an additional README file with some resources to get you started on the topic. We really recommend that you have a look at them before you start. |
38 | 33 |
|
39 |
| -Running `rustlings verify` will compile every exercise in the recommended order. It will stop at the first exercise that didn't compile and show you the error to be solved. |
| 34 | +Your task is simple. Every exercise contains an error you have to solve in order to make it compile. Running `rustlings verify` will compile every exercise in the recommended order. It will stop at the first exercise that didn't compile and show you the error to be solved. |
40 | 35 |
|
41 | 36 | `rustlings watch` will rerun this verification every time you save an exercise.
|
42 | 37 |
|
|
0 commit comments