+
+
+ 4.7.1
+
+
+
+
+ Apr 20 2022 at 07:46 UTC
+
+
+
+
+
Features
+
+
The amount of dependency crates that need to be compiled went down from ~65 to
+~45 by bumping dependency versions.
+
The minimum Rust version in the install scripts has been bumped to 1.56.0 (this isn't in
+the release itself, since install scripts don't really get versioned)
+
+
Bug Fixes
+
+
arc1: A small part has been rewritten using a more functional code style (#968).
+
using_as: A small part has been refactored to use sum instead of fold, resulting
+in better readability.
+
+
Housekeeping
+
+
The changelog will now be manually written instead of being automatically generated by the
+Git log.
+
+
+ 5.0.0
+
+
+
+
+ Jul 16 2022 at 12:36 UTC
+
+
+
+
+
Features
+
+
Hint comments in exercises now also include a reference to the
+hint watch mode subcommand.
+
intro1: Added more hints to point the user to the source file.
+
variables: Switched variables3 and variables4.
+
Moved vec and primitive_types exercises before move_semantics.
+
Renamed vec to vecs to be more in line with the naming in general.
+
Split up the collections exercises in their own folders.
+
vec2: Added a second part of the function that provides an alternative,
+immutable way of modifying vec values.
+
enums3: Added a hint.
+
Moved strings before modules.
+
Added a strings3 exercise to teach modifying strings.
+
Added a hashmaps3 exercise for some advanced usage of hashmaps.
+
Moved the original quiz2 to be strings4, since it only tested strings
+anyways.
+
Reworked quiz2 into a new exercise that tests more chapters.
+
Renamed option to options.
+
options1: Rewrote parts of the exercise to remove the weird array
+iteration stuff.
+
Moved generics3 to be quiz3.
+
Moved box/arc exercises behind iterators.
+
iterators4: Added a test for factorials of zero.
+
Split threads1 between two exercises, the first one focusing more on
+JoinHandles.
+
Added a threads3 exercises that uses std::sync::mpsc.
+
Added a clippy3 exercises with some more interesting checks.
+
as_ref_mut: Added a section that actually tests AsMut.
+
Added 3 new lifetimes exercises.
+
Added 3 new traits exercises.
+
+
Bug Fixes
+
+
variables2: Made output messages more verbose.
+
variables5: Added a nudging hint about shadowing.
+
variables6: Fixed link to book.
+
functions: Clarified the README wording. Generally cleaned up
+some hints and added some extra comments.
+
if2: Renamed function name to foo_if_fizz.
+
move_semantics: Clarified some hints.
+
quiz1: Renamed the function name to be more verbose.
+
structs1: Use an integer type instead of strings. Renamed "unit structs"
+to "unit-like structs", as is used in the book.
+
structs3: Added the panic! statement in from the beginning.
+
errors1: Use is_empty() instead of len() > 0
+
errors3: Improved the hint.
+
errors5: Improved exercise instructions and the hint.
+
errors6: Provided the skeleton of one of the functions that's supposed
+to be implemented.
+
iterators3: Inserted todo! into divide() to keep a compiler error
+from happening.
+
from_str: Added a hint comment about string error message conversion with
+Box<dyn Error>.
+
try_from_into: Fixed the function name in comment.
+
+
Removed
+
+
Removed the legacy LSP feature that was using mod.rs files.
+
Removed quiz4.
+
Removed advanced_errs. These were the last exercises in the recommended
+order, and I've always felt like they didn't quite fit in with the mostly
+simple, book-following style we've had in Rustlings.
+
+
Housekeeping
+
+
Added missing exercises to the book index.
+
Updated spacing in Cargo.toml.
+
Added a GitHub actions config so that tests run on every PR/commit.
+
+
+ v6.0.0
+
+
+
+
+ Jul 3 2024 at 13:43 UTC
+
+
+
+
+
This release is the result of a complete rewrite to deliver a ton of new features and improvements ✨
+The most important changes are highlighted below.
+
Installation
+
The installation has been simplified a lot!
+To install Rustlings after installing Rust, all what you need to do now is running the following command:
+
cargo install rustlings
+
+
+
Yes, this means that Rustlings is now on crates.io 🎉
+
You can read about the motivations of this change in this issue.
+
UI/UX
+
+
The UI is now responsive when the terminal is resized.
+
The progress bar was moved to the bottom so that you can always see your progress and the current exercise to work on.
+
The current exercise path is now a terminal link. It will open the exercise file in your default editor when you click on it.
+
A small prompt is now always shown at the bottom. It allows you to choose an action by entering a character. For example, entering h will show you the hint of the current exercise.
+
The comment "I AM NOT DONE!" doesn't exist anymore. Instead of needing to remove it to go to the next exercise, you need to enter n in the terminal.
+
+
List mode
+
A new list mode was added!
+You can enter it by entering l in the watch mode.
+It offers the following features:
+
+
Browse all exercises and see their state (pending/done).
+
Filter exercises based on their state (pending/done).
+
Continue at another exercise. This allows you to skip some exercises or go back to previous ones.
+
Reset an exercise so you can start over and revert your changes.
+
+
Solutions
+
After finishing an exercise, a solution file will be available and Rustlings will show you its path in green.
+This allows you to compare your solution with an idiomatic solution and maybe learn about other ways to solve a problem.
+
While writing the solutions, all exercises have been polished 🌟
+For example, every exercise now contains TODO comments to highlight what the user needs to change and where.
+
LSP support out of the box
+
Instead of creating a project.json file using rustlings lsp, Rustlings now works with a Cargo.toml file out of the box.
+No actions are needed to activate the language server rust-analyzer.
+
This should avoid issues related to the language server or to running exercises, especially the ones with Clippy.
+
Clippy
+
Clippy lints are now shown on all exercises, not only the Clippy exercises 📎
+Make Clippy your friend from early on 🥰
+
Third-party exercises
+
Rustlings now supports third-party exercises!
+
Do you want to create your own set of Rustlings exercises to focus on some specific topic?
+Or do you want to translate the original Rustlings exercises?
+Then follow the link to the guide about third-party exercises!
+
+
+ 5.0.0
+
+
+
+
+ Jul 16 2022 at 12:36 UTC
+
+
+
+
+
Features
+
+
Hint comments in exercises now also include a reference to the
+hint watch mode subcommand.
+
intro1: Added more hints to point the user to the source file.
+
variables: Switched variables3 and variables4.
+
Moved vec and primitive_types exercises before move_semantics.
+
Renamed vec to vecs to be more in line with the naming in general.
+
Split up the collections exercises in their own folders.
+
vec2: Added a second part of the function that provides an alternative,
+immutable way of modifying vec values.
+
enums3: Added a hint.
+
Moved strings before modules.
+
Added a strings3 exercise to teach modifying strings.
+
Added a hashmaps3 exercise for some advanced usage of hashmaps.
+
Moved the original quiz2 to be strings4, since it only tested strings
+anyways.
+
Reworked quiz2 into a new exercise that tests more chapters.
+
Renamed option to options.
+
options1: Rewrote parts of the exercise to remove the weird array
+iteration stuff.
+
Moved generics3 to be quiz3.
+
Moved box/arc exercises behind iterators.
+
iterators4: Added a test for factorials of zero.
+
Split threads1 between two exercises, the first one focusing more on
+JoinHandles.
+
Added a threads3 exercises that uses std::sync::mpsc.
+
Added a clippy3 exercises with some more interesting checks.
+
as_ref_mut: Added a section that actually tests AsMut.
+
Added 3 new lifetimes exercises.
+
Added 3 new traits exercises.
+
+
Bug Fixes
+
+
variables2: Made output messages more verbose.
+
variables5: Added a nudging hint about shadowing.
+
variables6: Fixed link to book.
+
functions: Clarified the README wording. Generally cleaned up
+some hints and added some extra comments.
+
if2: Renamed function name to foo_if_fizz.
+
move_semantics: Clarified some hints.
+
quiz1: Renamed the function name to be more verbose.
+
structs1: Use an integer type instead of strings. Renamed "unit structs"
+to "unit-like structs", as is used in the book.
+
structs3: Added the panic! statement in from the beginning.
+
errors1: Use is_empty() instead of len() > 0
+
errors3: Improved the hint.
+
errors5: Improved exercise instructions and the hint.
+
errors6: Provided the skeleton of one of the functions that's supposed
+to be implemented.
+
iterators3: Inserted todo! into divide() to keep a compiler error
+from happening.
+
from_str: Added a hint comment about string error message conversion with
+Box<dyn Error>.
+
try_from_into: Fixed the function name in comment.
+
+
Removed
+
+
Removed the legacy LSP feature that was using mod.rs files.
+
Removed quiz4.
+
Removed advanced_errs. These were the last exercises in the recommended
+order, and I've always felt like they didn't quite fit in with the mostly
+simple, book-following style we've had in Rustlings.
+
+
Housekeeping
+
+
Added missing exercises to the book index.
+
Updated spacing in Cargo.toml.
+
Added a GitHub actions config so that tests run on every PR/commit.
+
+
+ 4.7.1
+
+
+
+
+ Apr 20 2022 at 07:46 UTC
+
+
+
+
+
Features
+
+
The amount of dependency crates that need to be compiled went down from ~65 to
+~45 by bumping dependency versions.
+
The minimum Rust version in the install scripts has been bumped to 1.56.0 (this isn't in
+the release itself, since install scripts don't really get versioned)
+
+
Bug Fixes
+
+
arc1: A small part has been rewritten using a more functional code style (#968).
+
using_as: A small part has been refactored to use sum instead of fold, resulting
+in better readability.
+
+
Housekeeping
+
+
The changelog will now be manually written instead of being automatically generated by the
+Git log.
+
+
+ v6.0.0
+
+
+
+
+ Jul 3 2024 at 13:43 UTC
+
+
+
+
+
This release is the result of a complete rewrite to deliver a ton of new features and improvements ✨
+The most important changes are highlighted below.
+
Installation
+
The installation has been simplified a lot!
+To install Rustlings after installing Rust, all what you need to do now is running the following command:
+
cargo install rustlings
+
+
+
Yes, this means that Rustlings is now on crates.io 🎉
+
You can read about the motivations of this change in this issue.
+
UI/UX
+
+
The UI is now responsive when the terminal is resized.
+
The progress bar was moved to the bottom so that you can always see your progress and the current exercise to work on.
+
The current exercise path is now a terminal link. It will open the exercise file in your default editor when you click on it.
+
A small prompt is now always shown at the bottom. It allows you to choose an action by entering a character. For example, entering h will show you the hint of the current exercise.
+
The comment "I AM NOT DONE!" doesn't exist anymore. Instead of needing to remove it to go to the next exercise, you need to enter n in the terminal.
+
+
List mode
+
A new list mode was added!
+You can enter it by entering l in the watch mode.
+It offers the following features:
+
+
Browse all exercises and see their state (pending/done).
+
Filter exercises based on their state (pending/done).
+
Continue at another exercise. This allows you to skip some exercises or go back to previous ones.
+
Reset an exercise so you can start over and revert your changes.
+
+
Solutions
+
After finishing an exercise, a solution file will be available and Rustlings will show you its path in green.
+This allows you to compare your solution with an idiomatic solution and maybe learn about other ways to solve a problem.
+
While writing the solutions, all exercises have been polished 🌟
+For example, every exercise now contains TODO comments to highlight what the user needs to change and where.
+
LSP support out of the box
+
Instead of creating a project.json file using rustlings lsp, Rustlings now works with a Cargo.toml file out of the box.
+No actions are needed to activate the language server rust-analyzer.
+
This should avoid issues related to the language server or to running exercises, especially the ones with Clippy.
+
Clippy
+
Clippy lints are now shown on all exercises, not only the Clippy exercises 📎
+Make Clippy your friend from early on 🥰
+
Third-party exercises
+
Rustlings now supports third-party exercises!
+
Do you want to create your own set of Rustlings exercises to focus on some specific topic?
+Or do you want to translate the original Rustlings exercises?
+Then follow the link to the guide about third-party exercises!
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!
+
It is recommended to do the Rustlings exercises in parallel to reading the official Rust book, the most comprehensive resource for learning Rust 📚️
+
Rust By Example is another recommended resource that you might find helpful.
+It contains code examples and exercises similar to Rustlings, but online.
+
Getting Started
+
Installing Rust
+
Before installing Rustlings, you need to have the latest version of Rust installed.
+Visit www.rust-lang.org/tools/install for further instructions on installing Rust.
+This will also install Cargo, Rust's package/project manager.
+
+
🐧 If you're on Linux, make sure you've installed gcc (for a linker).
While working with Rustlings, please use a modern terminal for the best user experience.
+The default terminal on Linux and Mac should be sufficient.
+On Windows, we recommend the Windows Terminal.
+
Doing exercises
+
The exercises are sorted by topic and can be found in the subdirectory exercises/<topic>.
+For every topic, there is an additional README.md file with some resources to get you started on the topic.
+We highly recommend that you have a look at them before you start 📚️
+
Most exercises contain an error that keeps them from compiling, and it's up to you to fix it!
+Some exercises contain tests that need to pass for the exercise to be done ✅
+
Search for TODO and todo!() to find out what you need to change.
+Ask for hints by entering h in the watch mode 💡
+
Watch Mode
+
After initialization, Rustlings can be launched by simply running the command rustlings.
+
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 rerun the current exercise automatically every time you change the exercise's file in the exercises/ directory.
+
+If detecting file changes in the exercises/ directory fails… (click to expand)
+
+
You can add the --manual-run flag (rustlings --manual-run) to manually rerun the current exercise by entering r in the watch mode.
+
Please report the issue with some information about your operating system and whether you run Rustlings in a container or virtual machine (e.g. WSL).
+
+
+
Exercise List
+
In the watch mode (after launching rustlings), you can enter l to open the interactive exercise list.
+
The list allows you to…
+
+
See the status of all exercises (done or pending)
+
c: Continue at another exercise (temporarily skip some exercises or go back to a previous one)
+
r: Reset status and file of the selected exercise (you need to reload/reopen its file in your editor afterwards)
+
+
See the footer of the list for all possible keys.
+
Questions?
+
If you need any help while doing the exercises and the builtin-hints aren't helpful, feel free to ask in the Q&A category of the discussions if your question wasn't asked yet 💡
+
Third-Party Exercises
+
Third-party exercises are a set of exercises maintained by the community.
+You can use the same rustlings program that you installed with cargo install rustlings to run them:
+
+
日本語版 Rustlings:A Japanese translation of the Rustlings exercises.
+
+
Do you want to create your own set of Rustlings exercises to focus on some specific topic?
+Or do you want to translate the original Rustlings exercises?
+Then follow the the guide about third-party exercises!
+
Continuing On
+
Once you've completed Rustlings, put your new knowledge to good use!
+Continue practicing your Rust skills by building your own projects, contributing to Rustlings, or finding other open-source projects to contribute to.
+
Uninstalling Rustlings
+
If you want to remove Rustlings from your system, run the following command: