Update README

This commit is contained in:
mo8it 2024-04-26 03:17:35 +02:00
parent 2965867338
commit 74ae506603

View file

@ -36,13 +36,17 @@ cargo install rustlings@6.0.0-beta.3
``` ```
<details> <details>
<summary>If the installation fails 🐛… (click to expand)</summary> <summary>
**If the installation fails…** (_click to expand_)
</summary>
<!-- TODO: Remove @6.0.0-beta.x --> <!-- TODO: Remove @6.0.0-beta.x -->
- Make sure you have the latest Rust version by running `rustup update`. - Make sure you have the latest Rust version by running `rustup update`.
- Try adding the `--locked` flag: `cargo install rustlings --locked` - Try adding the `--locked` flag: `cargo install rustlings@6.0.0-beta.3 --locked`
- Otherwise, please [report an issue](https://github.com/rust-lang/rustlings/issues/new). - Otherwise, please [report the issue](https://github.com/rust-lang/rustlings/issues/new).
</details> </details>
@ -63,45 +67,48 @@ rustlings
## Doing exercises ## Doing exercises
The exercises are sorted by topic and can be found in the subdirectory `rustlings/exercises/<topic>`. The exercises are sorted by topic and can be found in the subdirectory `exercises/<topic>`.
For every topic there is an additional README file with some resources to get you started on the topic. For every topic, there is an additional `README.md` file with some resources to get you started on the topic.
We really recommend that you have a look at them before you start. We highly recommend that you have a look at them before you start 📚️
The task is simple.
Most exercises contain an error that keeps them from compiling, and it's up to you to fix it! Most exercises contain an error that keeps them from compiling, and it's up to you to fix it!
Some exercises are also run as tests, but Rustlings handles them all the same. Some exercises contain tests that need to pass for the exercise to be done.
To run the exercises in the recommended order, execute:
### Watch Mode
To run the exercises, launch Rustlings:
```bash ```bash
rustlings rustlings
``` ```
This will try to verify the completion of every exercise in a predetermined order (what we think is best for newcomers). This will start the _watch mode_ which walks you through the exercises in a predefined order (what we think is best for newcomers).
It will also rerun automatically every time you change a file in the `exercises/` directory. It will rerun the current exercise automatically every time you change the exercise's file in the `exercises/` directory.
In case you want to go by your own order, or want to only verify a single exercise, you can run: <details>
<summary>
```bash **If detecting file changes in the `exercises/` directory fails…** (_click to expand_)
rustlings run EXERCISE_NAME
```
Or simply use the following command to run the next pending exercise in the course: </summary>
```bash You can add the `--manual-run` flag (`rustlings --manual-run`) to manually rerun the current exercise by entering `r` or `run` in the watch mode.
rustlings run
```
In case you get stuck, you can run the following command to get a hint for your exercise: Please [report the issue](https://github.com/rust-lang/rustlings/issues/new) with some information about your operating system and whether you run Rustlings in a container or virtual machine (e.g. WSL).
```bash </details>
rustlings hint EXERCISE_NAME
```
You can also get the hint for the next pending exercise with the following command: ### Exercise List
```bash In the [watch mode](#watch-mode) (after launching `rustlings`), you can enter `l` or `list` to open the interactive exercise list.
rustlings hint
``` The list allows you to…
- See the status of all exercises (done or pending)
- `c`: Continue at another exercise (temporarelly skip some exercises or go back to a previous one)
- `r`: Reset the status and file of an exercise (you need to reload/reopen its file in your editor afterwards)
See the footer of the list for all possible keys.
## Continuing On ## Continuing On
@ -112,15 +119,7 @@ Continue practicing your Rust skills by building your own projects, contributing
## Uninstalling Rustlings ## Uninstalling Rustlings
If you want to remove Rustlings from your system, there are two steps. If you want to remove Rustlings from your system, run the following command:
1⃣ Remove the `rustlings` directory that was created by `rustlings init`:
```bash
rm -r rustlings
```
2⃣ Run `cargo uninstall` to remove the `rustlings` binary:
```bash ```bash
cargo uninstall rustlings cargo uninstall rustlings
@ -130,7 +129,7 @@ That's it!
## Contributing ## Contributing
See [CONTRIBUTING.md](https://github.com/rust-lang/rustlings/blob/main/CONTRIBUTING.md). See [CONTRIBUTING.md](https://github.com/rust-lang/rustlings/blob/main/CONTRIBUTING.md) 🔗
## Contributors ✨ ## Contributors ✨