commit 1e96dab8f0baaed4547f6d0aac03edd5e00fb703 Author: mo8it <76752051+mo8it@users.noreply.github.com> Date: Wed Nov 13 15:07:00 2024 +0000 Deploying to gh-pages from @ rust-lang/rustlings@38016cb2d6053c7d4f18c7ca98880a3ac7d392fa 🚀 diff --git a/CNAME b/CNAME new file mode 100644 index 00000000..5042fd55 --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +rustlings.cool \ No newline at end of file diff --git a/artifacts.js b/artifacts.js new file mode 100644 index 00000000..2dbfc707 --- /dev/null +++ b/artifacts.js @@ -0,0 +1,245 @@ +/* Code modified from the blender website + * https://www.blender.org/wp-content/themes/bthree/assets/js/get_os.js?x82196 + */ + +let options = { + windows64: "x86_64-pc-windows", + windows32: "i686-pc-windows", + windowsArm: "aarch64-pc-windows", + + mac64: "x86_64-apple", + mac32: "i686-apple", + macSilicon: "aarch64-apple", + + linux64: "x86_64-unknown-linux", + linux32: "i686-unknown-linux", + linuxArm: "aarch64-unknown-linux", + + // ios: "ios", + // android: "linux-android", + // freebsd: "freebsd", +}; + +function isAppleSilicon() { + try { + var glcontext = document.createElement("canvas").getContext("webgl"); + var debugrenderer = glcontext + ? glcontext.getExtension("WEBGL_debug_renderer_info") + : null; + var renderername = + (debugrenderer && + glcontext.getParameter(debugrenderer.UNMASKED_RENDERER_WEBGL)) || + ""; + if (renderername.match(/Apple M/) || renderername.match(/Apple GPU/)) { + return true; + } + + return false; + } catch (e) {} +} + +function getOS() { + var OS = options.windows64.default; + var userAgent = navigator.userAgent; + var platform = navigator.platform; + + if (navigator.appVersion.includes("Win")) { + if ( + !userAgent.includes("Windows NT 5.0") && + !userAgent.includes("Windows NT 5.1") && + (userAgent.indexOf("Win64") > -1 || + platform == "Win64" || + userAgent.indexOf("x86_64") > -1 || + userAgent.indexOf("x86_64") > -1 || + userAgent.indexOf("amd64") > -1 || + userAgent.indexOf("AMD64") > -1 || + userAgent.indexOf("WOW64") > -1) + ) { + OS = options.windows64; + } else { + if ( + window.external && + window.external.getHostEnvironmentValue && + window.external + .getHostEnvironmentValue("os-architecture") + .includes("ARM64") + ) { + OS = options.windowsArm; + } else { + try { + var canvas = document.createElement("canvas"); + var gl = canvas.getContext("webgl"); + + var debugInfo = gl.getExtension("WEBGL_debug_renderer_info"); + var renderer = gl.getParameter(debugInfo.UNMASKED_RENDERER_WEBGL); + if (renderer.includes("Qualcomm")) OS = options.windowsArm; + } catch (e) {} + } + } + } + + //MacOS, MacOS X, macOS + if (navigator.appVersion.includes("Mac")) { + if ( + navigator.userAgent.includes("OS X 10.5") || + navigator.userAgent.includes("OS X 10.6") + ) { + OS = options.mac32; + } else { + OS = options.mac64; + + const isSilicon = isAppleSilicon(); + if (isSilicon) { + OS = options.macSilicon; + } + } + } + + // linux + if (platform.includes("Linux")) { + OS = options.linux64; + // FIXME: Can we find out whether linux 32-bit or ARM are used? + } + + // if ( + // userAgent.includes("iPad") || + // userAgent.includes("iPhone") || + // userAgent.includes("iPod") + // ) { + // OS = options.ios; + // } + // if (platform.toLocaleLowerCase().includes("freebsd")) { + // OS = options.freebsd; + // } + + return OS; +} + +let os = getOS(); +window.os = os; + +// Unhide and hydrate selector with events +const archSelect = document.querySelector(".arch-select"); +if (archSelect) { + archSelect.classList.remove("hidden"); + const selector = document.querySelector("#install-arch-select"); + if (selector) { + selector.addEventListener("change", onArchChange); + } +} + +// Hydrate tab buttons with events +Array.from(document.querySelectorAll(".install-tab[data-id]")).forEach((tab) => { + tab.addEventListener("click", onTabClick); +}); + +function onArchChange(evt) { + // Get target + const target = evt.currentTarget.value; + // Find corresponding installer lists + const newContentEl = document.querySelector(`.arch[data-arch=${target}]`); + const oldContentEl = document.querySelector(`.arch[data-arch]:not(.hidden)`); + // Hide old content element (if applicable) + if (oldContentEl) { + oldContentEl.classList.add("hidden"); + } + // Show new content element + newContentEl.classList.remove("hidden"); + // Show the first tab's content if nothing was selected before + if (newContentEl.querySelectorAll(".install-tab.selected").length === 0) { + const firstContentChild = newContentEl.querySelector(".install-content:first-of-type"); + const firstTabChild = newContentEl.querySelector(".install-tab:first-of-type"); + firstContentChild.classList.remove("hidden"); + if (firstTabChild) { + firstTabChild.classList.add("selected"); + } + } + // Hide "no OS detected" message + const noDetectEl = document.querySelector(".no-autodetect"); + noDetectEl.classList.add("hidden"); + // Hide Mac hint + document.querySelector(".mac-switch").classList.add("hidden"); +} + +function onTabClick(evt) { + // Get target and ID + const {triple, id} = evt.currentTarget.dataset; + if (triple) { + // Find corresponding content elements + const newContentEl = document.querySelector(`.install-content[data-id="${String(id)}"][data-triple=${triple}]`); + const oldContentEl = document.querySelector(`.install-content[data-triple=${triple}][data-id]:not(.hidden)`); + // Find old tab to unselect + const oldTabEl = document.querySelector(`.install-tab[data-triple=${triple}].selected`); + // Hide old content element + if (oldContentEl && oldTabEl) { + oldContentEl.classList.add("hidden"); + oldTabEl.classList.remove("selected"); + } + + // Unhide new content element + newContentEl.classList.remove("hidden"); + // Select new tab element + evt.currentTarget.classList.add("selected"); + } +} + +const allPlatforms = Array.from(document.querySelectorAll(`.arch[data-arch]`)); +let hit = allPlatforms.find( + (a) => { + // Show Intel Mac downloads if no M1 Mac downloads are available + if ( + a.attributes["data-arch"].value.includes(options.mac64) && + os.includes(options.macSilicon) && + !allPlatforms.find(p => p.attributes["data-arch"].value.includes(options.macSilicon))) { + // Unhide hint + document.querySelector(".mac-switch").classList.remove("hidden"); + return true; + } + return a.attributes["data-arch"].value.includes(os); + } +); + +if (hit) { + hit.classList.remove("hidden"); + const selectEl = document.querySelector("#install-arch-select"); + selectEl.value = hit.dataset.arch; + const firstContentChild = hit.querySelector(".install-content:first-of-type"); + const firstTabChild = hit.querySelector(".install-tab:first-of-type"); + firstContentChild.classList.remove("hidden"); + if (firstTabChild) { + firstTabChild.classList.add("selected"); + } +} else { + const noDetectEl = document.querySelector(".no-autodetect"); + if (noDetectEl) { + const noDetectElDetails = document.querySelector(".no-autodetect-details"); + if (noDetectElDetails) { + noDetectElDetails.innerHTML = `We detected you're on ${os} but there don't seem to be installers for that. ` + } + noDetectEl.classList.remove("hidden"); + } +} + +let copyButtons = Array.from(document.querySelectorAll("[data-copy]")); +if (copyButtons.length) { + copyButtons.forEach(function (element) { + element.addEventListener("click", () => { + navigator.clipboard.writeText(element.attributes["data-copy"].value); + }); + }); +} + +// Toggle for pre releases +const checkbox = document.getElementById("show-prereleases"); + +if (checkbox) { + checkbox.addEventListener("click", () => { + const all = document.getElementsByClassName("pre-release"); + + if (all) { + for (var item of all) { + item.classList.toggle("hidden"); + } + } + }); +} \ No newline at end of file diff --git a/changelog/2.2.1/index.html b/changelog/2.2.1/index.html new file mode 100644 index 00000000..71dbb249 --- /dev/null +++ b/changelog/2.2.1/index.html @@ -0,0 +1,111 @@ + + +
+watch
(1caef0b4)sum
instead of fold
, resulting
+in better readability.rustlings watch
.rustlings lsp
command to enable rust-analyzer
.hint
watch mode subcommand.vec
and primitive_types
exercises before move_semantics
.vec
to vecs
to be more in line with the naming in general.collections
exercises in their own folders.strings
before modules
.strings3
exercise to teach modifying strings.hashmaps3
exercise for some advanced usage of hashmaps.quiz2
to be strings4
, since it only tested strings
+anyways.quiz2
into a new exercise that tests more chapters.option
to options
.generics3
to be quiz3
.iterators
.threads1
between two exercises, the first one focusing more on
+JoinHandle
s.threads3
exercises that uses std::sync::mpsc
.clippy3
exercises with some more interesting checks.AsMut
.foo_if_fizz
.panic!
statement in from the beginning.is_empty()
instead of len() > 0
todo!
into divide()
to keep a compiler error
+from happening.Box<dyn Error>
.mod.rs
files.quiz4
.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.rc1
exercise.cow1
exercise.unimplemented!
with todo!
Box<dyn Error>
cargo install --path .
flake.nix
for Nix usersstd
in the hintArc::clone
standard_library_types
into iterators
and smart_pointers
rc1
before arc1
rustlings lsp
watch
delay from 2 to 1 secondrustc
commandsvecs
: Added links to iter_mut
and map
to README.mdcow1
: Changed main to testsiterators1
: Formatted according to rustfmterrors5
: Unified undisclosed type notationarc1
: Improved readability by avoiding implicit dereferencemacros4
: Prevented auto-fix by adding #[rustfmt::skip]
cli
: Actually show correct progress percentagesstrings2
: Added a reference to the book chapter for reference conversionlifetimes
: Added a link to the lifetimekata projecttests4
exercises, which teaches about testing for panics!
prefix command to watch mode that runs an external command--success-hints
option to watch mode that shows hints on exercise successvecs2
: Renamed iterator variable bindings for clarifylifetimes
: Changed order of book referenceshashmaps2
: Clarified instructions in the todo blockoptions2
: Improved tests for layering optionsmodules2
: Added more information to the hinterrors2
: Corrected a comment wordingiterators2
: Fixed a spelling mistake in the hint textvariables
: Wrapped the mut keyword with backticks for readabilitymove_semantics2
: Removed references to line numberscow1
: Clarified the owned_no_mutation
commentsoptions3
: Changed exercise to panic when no match is foundrustlings lsp
now generates absolute paths, which should fix VSCode rust-analyzer
usage on Windowsif3
, teaching the user about if let
statements.hashmaps2
: Added an extra test function to check if the amount of fruits is higher than zero.enums3
: Added a test for Message
.if1
: Added a test case to check equal values.if3
: Added a note specifying that there are no test changes needed.clap
- it's matured much since we switched to argh
:)structs3
: Switched from i32 to u32.move_semantics
: Switched 1-4 to tests, and rewrote them to be way simpler, while still teaching about the same
+concepts.iterators5
:
+vecs2
: Updated the hint to reference the renamed loop variable.enums3
: Changed message string in test so that it gets properly tested.strings2
: Corrected line number in hint, then removed it (this both happened as part of this release cycle).primitive_types4
: Updated hint to the correct ending index.quiz1
: Removed duplicated sentence from exercise comments.errors4
: Improved comment.from_into
: Fixed test values.cow1
: Added .to_mut()
to distinguish from the previous test case.threads2
: Updated hint text to reference the correct book heading.cow1
: Reverted regression introduced by calling to_mut
where it
+shouldn't have been called, and clarified comment.primitive_types3
: Require at least an array of 100 elements.as_ref_mut
: Fixed a typo in a test function name.enums3
: Fixed formatting with rustfmt
.s
or /
🔍️ (thanks to @frroossst)c
in the prompt to manually check all exercises ✅ (thanks to @Nahor)check-all
to manually check all exercises ✅ (thanks to @Nahor)x
in the prompt to reset the file of the current exercise 🔄dead_code
for all exercises and solutions ⚰️ (thanks to @huss4in)enums3
: Remove redundant enum definition task (thanks to @senekor)if2
: Make the exercise less confusing by avoiding "fizz", "fuzz", "foo", "bar" and "baz" (thanks to @senekor)hashmap3
: Use the method Entry::or_default
.forbid(unsafe_code)
: You shouldn't write unsafe code in Rustlings.forbid(unstable_features)
: You don't need unstable features in Rustlings and shouldn't rely on them while learning Rust.forbid(todo)
: You forgot a todo!()
.forbid(empty_loop)
: This can only happen by mistake in Rustlings.deny(infinite_loop)
: No infinite loops are needed in Rustlings.deny(mem_forget)
: You shouldn't leak memory while still learning Rust.dev check
: Show the progress of checks.dev check
: Check that the length of all exercise names is lower than 32.dev check
: Check if exercise contains no tests and isn't marked with test = false
.c
in the list for "continue on" now quits the list after setting the selected exercise as the current one.q
only quitting the list and not the whole program in the list.r
only resetting one exercise (the selected one) in the list.git init
.threads3
: Remove the queue length and improve tests.errors4
: Use match instead of a comparison chain in the solution.functions3
: Only take u8
to avoid using a too high number of iterations by mistake.dev check
: Always check with strict Clippy (warnings to errors) when checking the solutions.README.md
file to the solutions/
directory.dev check
: Check that all solutions are formatted with rustfmt
..gitignore
file.dev check
: Check that all exercises (including third-party ones) include at least one TODO
comment.dev check
: Check that all exercises actually fail to run (not already solved).iterators3
: Teach about the possible case of integer overflow during division.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.
+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.
+h
will show you the hint of the current exercise.n
in the terminal.A new list mode was added!
+You can enter it by entering l
in the watch mode.
+It offers the following features:
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.
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 lints are now shown on all exercises, not only the Clippy exercises 📎 +Make Clippy your friend from early on 🥰
+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!
+ + +cow1
: Reverted regression introduced by calling to_mut
where it
+shouldn't have been called, and clarified comment.primitive_types3
: Require at least an array of 100 elements.as_ref_mut
: Fixed a typo in a test function name.enums3
: Fixed formatting with rustfmt
.if3
, teaching the user about if let
statements.hashmaps2
: Added an extra test function to check if the amount of fruits is higher than zero.enums3
: Added a test for Message
.if1
: Added a test case to check equal values.if3
: Added a note specifying that there are no test changes needed.clap
- it's matured much since we switched to argh
:)structs3
: Switched from i32 to u32.move_semantics
: Switched 1-4 to tests, and rewrote them to be way simpler, while still teaching about the same
+concepts.iterators5
:
+vecs2
: Updated the hint to reference the renamed loop variable.enums3
: Changed message string in test so that it gets properly tested.strings2
: Corrected line number in hint, then removed it (this both happened as part of this release cycle).primitive_types4
: Updated hint to the correct ending index.quiz1
: Removed duplicated sentence from exercise comments.errors4
: Improved comment.from_into
: Fixed test values.cow1
: Added .to_mut()
to distinguish from the previous test case.threads2
: Updated hint text to reference the correct book heading.strings2
: Added a reference to the book chapter for reference conversionlifetimes
: Added a link to the lifetimekata projecttests4
exercises, which teaches about testing for panics!
prefix command to watch mode that runs an external command--success-hints
option to watch mode that shows hints on exercise successvecs2
: Renamed iterator variable bindings for clarifylifetimes
: Changed order of book referenceshashmaps2
: Clarified instructions in the todo blockoptions2
: Improved tests for layering optionsmodules2
: Added more information to the hinterrors2
: Corrected a comment wordingiterators2
: Fixed a spelling mistake in the hint textvariables
: Wrapped the mut keyword with backticks for readabilitymove_semantics2
: Removed references to line numberscow1
: Clarified the owned_no_mutation
commentsoptions3
: Changed exercise to panic when no match is foundrustlings lsp
now generates absolute paths, which should fix VSCode rust-analyzer
usage on Windowsvecs
: Added links to iter_mut
and map
to README.mdcow1
: Changed main to testsiterators1
: Formatted according to rustfmterrors5
: Unified undisclosed type notationarc1
: Improved readability by avoiding implicit dereferencemacros4
: Prevented auto-fix by adding #[rustfmt::skip]
cli
: Actually show correct progress percentagesstandard_library_types
into iterators
and smart_pointers
rc1
before arc1
rustlings lsp
watch
delay from 2 to 1 secondrustc
commandsflake.nix
for Nix usersstd
in the hintArc::clone
rc1
exercise.cow1
exercise.unimplemented!
with todo!
Box<dyn Error>
cargo install --path .
hint
watch mode subcommand.vec
and primitive_types
exercises before move_semantics
.vec
to vecs
to be more in line with the naming in general.collections
exercises in their own folders.strings
before modules
.strings3
exercise to teach modifying strings.hashmaps3
exercise for some advanced usage of hashmaps.quiz2
to be strings4
, since it only tested strings
+anyways.quiz2
into a new exercise that tests more chapters.option
to options
.generics3
to be quiz3
.iterators
.threads1
between two exercises, the first one focusing more on
+JoinHandle
s.threads3
exercises that uses std::sync::mpsc
.clippy3
exercises with some more interesting checks.AsMut
.foo_if_fizz
.panic!
statement in from the beginning.is_empty()
instead of len() > 0
todo!
into divide()
to keep a compiler error
+from happening.Box<dyn Error>
.mod.rs
files.quiz4
.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.rustlings watch
.rustlings lsp
command to enable rust-analyzer
.sum
instead of fold
, resulting
+in better readability.watch
(1caef0b4)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.
+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.
+h
will show you the hint of the current exercise.n
in the terminal.A new list mode was added!
+You can enter it by entering l
in the watch mode.
+It offers the following features:
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.
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 lints are now shown on all exercises, not only the Clippy exercises 📎 +Make Clippy your friend from early on 🥰
+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!
+ + +dev check
: Check that all exercises (including third-party ones) include at least one TODO
comment.dev check
: Check that all exercises actually fail to run (not already solved).iterators3
: Teach about the possible case of integer overflow during division.README.md
file to the solutions/
directory.dev check
: Check that all solutions are formatted with rustfmt
..gitignore
file.forbid(unsafe_code)
: You shouldn't write unsafe code in Rustlings.forbid(unstable_features)
: You don't need unstable features in Rustlings and shouldn't rely on them while learning Rust.forbid(todo)
: You forgot a todo!()
.forbid(empty_loop)
: This can only happen by mistake in Rustlings.deny(infinite_loop)
: No infinite loops are needed in Rustlings.deny(mem_forget)
: You shouldn't leak memory while still learning Rust.dev check
: Show the progress of checks.dev check
: Check that the length of all exercise names is lower than 32.dev check
: Check if exercise contains no tests and isn't marked with test = false
.c
in the list for "continue on" now quits the list after setting the selected exercise as the current one.q
only quitting the list and not the whole program in the list.r
only resetting one exercise (the selected one) in the list.git init
.threads3
: Remove the queue length and improve tests.errors4
: Use match instead of a comparison chain in the solution.functions3
: Only take u8
to avoid using a too high number of iterations by mistake.dev check
: Always check with strict Clippy (warnings to errors) when checking the solutions.s
or /
🔍️ (thanks to @frroossst)c
in the prompt to manually check all exercises ✅ (thanks to @Nahor)check-all
to manually check all exercises ✅ (thanks to @Nahor)x
in the prompt to reset the file of the current exercise 🔄dead_code
for all exercises and solutions ⚰️ (thanks to @huss4in)enums3
: Remove redundant enum definition task (thanks to @senekor)if2
: Make the exercise less confusing by avoiding "fizz", "fuzz", "foo", "bar" and "baz" (thanks to @senekor)hashmap3
: Use the method Entry::or_default
.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.
+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).Deb:
+sudo apt install gcc
. +Dnf:sudo dnf install gcc
.
++🍎 If you're on MacOS, make sure you've installed Xcode and its developer tools by running
+xcode-select --install
.
The following command will download and compile Rustlings:
+cargo install rustlings
+
+
+rustup update
--locked
flag: cargo install rustlings --locked
After installing Rustlings, run the following command to initialize the rustlings/
directory:
rustlings init
+
+
+rustlings
can't be found… (click to expand)You are probably using Linux and installed Rust using your package manager.
+Cargo installs binaries to the directory ~/.cargo/bin
.
+Sadly, package managers often don't add ~/.cargo/bin
to your PATH
environment variable.
The solution is to …
+~/.cargo/bin
manually to PATH
rustup
: https://www.rust-lang.org/tools/installNow, go into the newly initialized directory and launch Rustlings for further instructions on getting started with the exercises:
+cd rustlings/ +rustlings ++ +
Our general recommendation is VS Code with the rust-analyzer plugin. +But any editor that supports rust-analyzer should be enough for working on the exercises.
+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.
+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 💡
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.
exercises/
directory fails… (click to expand)++You can add the
+--manual-run
flag (rustlings --manual-run
) to manually rerun the current exercise by enteringr
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).
+
In the watch mode (after launching rustlings
), you can enter l
to open the interactive exercise list.
The list allows you to…
+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.
+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 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:
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!
+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.
+If you want to remove Rustlings from your system, run the following command:
+cargo uninstall rustlings
+
+
+See CONTRIBUTING.md 🔗
+Thanks to all the wonderful contributors 🎉
+ + +