From 5927a781a31f496223721f33ea19460daa3f70ab Mon Sep 17 00:00:00 2001 From: mo8it Date: Fri, 16 May 2025 11:29:32 +0200 Subject: Remove Oranda --- CHANGELOG.md | 90 ------------------------------------------------------------ 1 file changed, 90 deletions(-) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 7052977..6781ba8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,8 +5,6 @@ - Upgrade to Rust edition 2024 - Raise the minimum supported Rust version to `1.87` - - ## 6.4.0 (2024-11-11) ### Added @@ -36,8 +34,6 @@ - Fix bad contrast in the list on terminals with a light theme. - - ## 6.3.0 (2024-08-29) ### Added @@ -77,8 +73,6 @@ - Fix the list when the terminal height is too low. - Restore the terminal after an error in the list. - - ## 6.2.0 (2024-08-09) ### Added @@ -95,8 +89,6 @@ - Run the final check of all exercises in parallel. - Small exercise improvements. - - ## 6.1.0 (2024-07-10) #### Added @@ -114,15 +106,11 @@ - Exit with a helpful error message on missing/unsupported terminal/TTY. - Mark the last exercise as done. - - ## 6.0.1 (2024-07-04) Small exercise improvements and fixes. Most importantly, fixed that the exercise `clippy1` was already solved πŸ˜… - - ## 6.0.0 (2024-07-03) This release is the result of a complete rewrite to deliver a ton of new features and improvements ✨ @@ -188,8 +176,6 @@ Do you want to create your own set of Rustlings exercises to focus on some speci Or do you want to translate the original Rustlings exercises? Then follow the link to the guide about [third-party exercises](THIRD_PARTY_EXERCISES.md)! - - ## 5.6.1 (2023-09-18) #### Changed @@ -205,8 +191,6 @@ Then follow the link to the guide about [third-party exercises](THIRD_PARTY_EXER - `as_ref_mut`: Fixed a typo in a test function name. - `enums3`: Fixed formatting with `rustfmt`. - - ## 5.6.0 (2023-09-04) #### Added @@ -246,16 +230,12 @@ Then follow the link to the guide about [third-party exercises](THIRD_PARTY_EXER - Lots of Nix housekeeping that I don't feel qualified to write about! - Improved CI workflows, we're now testing on multiple platforms at once. - - ## 5.5.1 (2023-05-17) #### Fixed - Reverted `rust-project.json` path generation due to an upstream `rust-analyzer` fix. - - ## 5.5.0 (2023-05-17) #### Added @@ -290,8 +270,6 @@ Then follow the link to the guide about [third-party exercises](THIRD_PARTY_EXER - Added a markdown linter to run on GitHub actions - Split quick installation section into two code blocks - - ## 5.4.1 (2023-03-10) #### Changed @@ -307,8 +285,6 @@ Then follow the link to the guide about [third-party exercises](THIRD_PARTY_EXER - `macros4`: Prevented auto-fix by adding `#[rustfmt::skip]` - `cli`: Actually show correct progress percentages - - ## 5.4.0 (2023-02-12) #### Changed @@ -337,8 +313,6 @@ Then follow the link to the guide about [third-party exercises](THIRD_PARTY_EXER - Bumped min Rust version to 1.58 in installation script - - ## 5.3.0 (2022-12-23) #### Added @@ -371,8 +345,6 @@ Then follow the link to the guide about [third-party exercises](THIRD_PARTY_EXER - Applied some Clippy and rustfmt formatting - Added a note on Windows PowerShell and other shell compatibility - - ## 5.2.1 (2022-09-06) #### Fixed @@ -386,8 +358,6 @@ Then follow the link to the guide about [third-party exercises](THIRD_PARTY_EXER - Fixed a typo in README.md - - ## 5.2.0 (2022-08-27) #### Added @@ -404,16 +374,12 @@ Then follow the link to the guide about [third-party exercises](THIRD_PARTY_EXER - **quiz1**: Adjusted the explanations to be consistent with the tests - - ## 5.1.1 (2022-08-17) #### Bug Fixes - Fixed an incorrect assertion in options1 - - ## 5.1.0 (2022-08-16) #### Features @@ -448,8 +414,6 @@ Then follow the link to the guide about [third-party exercises](THIRD_PARTY_EXER - Clarified manual installation instructions using `cargo install --path .` - Added a link to our Zulip in the readme file - - ## 5.0.0 (2022-07-16) #### Features @@ -522,8 +486,6 @@ Then follow the link to the guide about [third-party exercises](THIRD_PARTY_EXER - Updated spacing in Cargo.toml. - Added a GitHub actions config so that tests run on every PR/commit. - - ## 4.8.0 (2022-07-01) #### Features @@ -544,8 +506,6 @@ Then follow the link to the guide about [third-party exercises](THIRD_PARTY_EXER - Replaced the git.io URL with the fully qualified URL because of git.io's sunsetting. - Removed the deprecated Rust GitPod extension. - - ## 4.7.1 (2022-04-20) #### Features @@ -566,8 +526,6 @@ Then follow the link to the guide about [third-party exercises](THIRD_PARTY_EXER - The changelog will now be manually written instead of being automatically generated by the Git log. - - ## 4.7.0 (2022-04-14) #### Features @@ -608,8 +566,6 @@ Then follow the link to the guide about [third-party exercises](THIRD_PARTY_EXER - Add hints on how to get GCC installed (#741) ([bc56861](https://github.com/rust-lang/rustlings/commit/bc5686174463ad6f4f6b824b0e9b97c3039d4886)) - Fix some code blocks that were not highlighted ([17f9d74](https://github.com/rust-lang/rustlings/commit/17f9d7429ccd133a72e815fb5618e0ce79560929)) - - ## 4.6.0 (2021-09-25) #### Features @@ -632,8 +588,6 @@ Then follow the link to the guide about [third-party exercises](THIRD_PARTY_EXER - Clarify instructions ([df25684c](https://github.com/rust-lang/rustlings/commit/df25684cb79f8413915e00b5efef29369849cef1)) - **quiz1:** Fix inconsistent wording (#826) ([03131a3d](https://github.com/rust-lang/rustlings/commit/03131a3d35d9842598150f9da817f7cc26e2669a)) - - ## 4.5.0 (2021-07-07) #### Features @@ -654,8 +608,6 @@ Then follow the link to the guide about [third-party exercises](THIRD_PARTY_EXER - **try_from_into, from_str:** hints for dyn Error ([11d2cf0d](https://github.com/rust-lang/rustlings/commit/11d2cf0d604dee3f5023c17802d69438e69fa50e)) - **variables5:** confine the answer further ([48ffcbd2](https://github.com/rust-lang/rustlings/commit/48ffcbd2c4cc4d936c2c7480019190f179813cc5)) - - ## 4.4.0 (2021-04-24) #### Bug Fixes @@ -697,8 +649,6 @@ Then follow the link to the guide about [third-party exercises](THIRD_PARTY_EXER - updated progress percentage ([1c6f7e4b](https://github.com/rust-lang/rustlings/commit/1c6f7e4b7b9b3bd36f4da2bb2b69c549cc8bd913)) - added progress info ([c0e3daac](https://github.com/rust-lang/rustlings/commit/c0e3daacaf6850811df5bc57fa43e0f249d5cfa4)) - - ## 4.3.0 (2020-12-29) #### Features @@ -721,8 +671,6 @@ Then follow the link to the guide about [third-party exercises](THIRD_PARTY_EXER - Update description (#584) ([96347df9](https://github.com/rust-lang/rustlings/commit/96347df9df294f01153b29d9ad4ba361f665c755)) - **vec1:** Have test compare every element in a and v ([9b6c6293](https://github.com/rust-lang/rustlings/commit/9b6c629397b24b944f484f5b2bbd8144266b5695)) - - ## 4.2.0 (2020-11-07) #### Features @@ -743,8 +691,6 @@ Then follow the link to the guide about [third-party exercises](THIRD_PARTY_EXER - missing comma in test ([4fb230da](https://github.com/rust-lang/rustlings/commit/4fb230daf1251444fcf29e085cee222a91f8a37e)) - **quiz3:** Second test is for odd numbers, not even. (#553) ([18e0bfef](https://github.com/rust-lang/rustlings/commit/18e0bfef1de53071e353ba1ec5837002ff7290e6)) - - ## 4.1.0 (2020-10-05) #### Bug Fixes @@ -767,8 +713,6 @@ Then follow the link to the guide about [third-party exercises](THIRD_PARTY_EXER - **cli:** Added 'cls' command to 'watch' mode (#474) ([4f2468e1](https://github.com/rust-lang/rustlings/commit/4f2468e14f574a93a2e9b688367b5752ed96ae7b)) - **try_from_into:** Add insufficient length test (#469) ([523d18b8](https://github.com/rust-lang/rustlings/commit/523d18b873a319f7c09262f44bd40e2fab1830e5)) - - ## 4.0.0 (2020-07-08) #### Breaking Changes @@ -810,8 +754,6 @@ Then follow the link to the guide about [third-party exercises](THIRD_PARTY_EXER - **test2:** name of type String and &str (#394) ([d6c0a688](https://github.com/rust-lang/rustlings/commit/d6c0a688e6a96f93ad60d540d4b326f342fc0d45)) - **variables6:** minor typo (#419) ([524e17df](https://github.com/rust-lang/rustlings/commit/524e17df10db95f7b90a0f75cc8997182a8a4094)) - - ## 3.0.0 (2020-04-11) #### Breaking Changes @@ -834,8 +776,6 @@ Then follow the link to the guide about [third-party exercises](THIRD_PARTY_EXER - add new exercises for generics (#280) ([76be5e4e](https://github.com/rust-lang/rustlings/commit/76be5e4e991160f5fd9093f03ee2ba260e8f7229)) - **ci:** add buildkite config ([b049fa2c](https://github.com/rust-lang/rustlings/commit/b049fa2c84dba0f0c8906ac44e28fd45fba51a71)) - - ### 2.2.1 (2020-02-27) #### Bug Fixes @@ -846,8 +786,6 @@ Then follow the link to the guide about [third-party exercises](THIRD_PARTY_EXER - Add clippy lints (#269) ([1e2fd9c9](https://github.com/rust-lang/rustlings/commit/1e2fd9c92f8cd6e389525ca1a999fca4c90b5921)) - - ## 2.2.0 (2020-02-25) #### Bug Fixes @@ -875,8 +813,6 @@ Then follow the link to the guide about [third-party exercises](THIRD_PARTY_EXER - Added traits exercises (#274 but specifically #216, which originally added this :heart:) ([b559cdd](https://github.com/rust-lang/rustlings/commit/b559cdd73f32c0d0cfc1feda39f82b3e3583df17)) - - ## 2.1.0 (2019-11-27) #### Bug Fixes @@ -894,8 +830,6 @@ Then follow the link to the guide about [third-party exercises](THIRD_PARTY_EXER - **watch:** show hint while watching ([8143d57b](https://github.com/rust-lang/rustlings/commit/8143d57b4e88c51341dd4a18a14c536042cc009c)) - - ## 2.0.0 (2019-11-12) #### Bug Fixes @@ -916,8 +850,6 @@ Then follow the link to the guide about [third-party exercises](THIRD_PARTY_EXER - **cli:** check for rustc before doing anything ([36a033b8](https://github.com/rust-lang/rustlings/commit/36a033b87a6549c1e5639c908bf7381c84f4f425)) - **hint:** Add test for hint ([ce9fa6eb](https://github.com/rust-lang/rustlings/commit/ce9fa6ebbfdc3e7585d488d9409797285708316f)) - - ### 1.5.1 (2019-11-11) #### Bug Fixes @@ -929,8 +861,6 @@ Then follow the link to the guide about [third-party exercises](THIRD_PARTY_EXER - **threads:** Move Threads behind SLT ([fbe91a67](https://github.com/rust-lang/rustlings/commit/fbe91a67a482bfe64cbcdd58d06ba830a0f39da3), closes [#205](https://github.com/rust-lang/rustlings/issues/205)) - **watch:** clear screen before each `verify()` ([3aff590](https://github.com/rust-lang/rustlings/commit/3aff59085586c24196a547c2693adbdcf4432648)) - - ## 1.5.0 (2019-11-09) #### Bug Fixes @@ -955,8 +885,6 @@ Then follow the link to the guide about [third-party exercises](THIRD_PARTY_EXER - Added exercise for struct update syntax ([1c4c8764](https://github.com/rust-lang/rustlings/commit/1c4c8764ed118740cd4cee73272ddc6cceb9d959)) - **iterators2:** adds iterators2 exercise including config ([9288fccf](https://github.com/rust-lang/rustlings/commit/9288fccf07a2c5043b76d0fd6491e4cf72d76031)) - - ### 1.4.1 (2019-08-13) #### Bug Fixes @@ -965,8 +893,6 @@ Then follow the link to the guide about [third-party exercises](THIRD_PARTY_EXER - **option1:** Add test for prematurely passing exercise ([a750e4a1](https://github.com/rust-lang/rustlings/commit/a750e4a1a3006227292bb17d57d78ce84da6bfc6)) - **test1:** Swap assertion parameter order ([4086d463](https://github.com/rust-lang/rustlings/commit/4086d463a981e81d97781851d17db2ced290f446)) - - ## 1.4.0 (2019-07-13) #### Bug Fixes @@ -983,8 +909,6 @@ Then follow the link to the guide about [third-party exercises](THIRD_PARTY_EXER - **changelog:** Use clog for changelogs ([34e31232](https://github.com/rust-lang/rustlings/commit/34e31232dfddde284a341c9609b33cd27d9d5724)) - **iterators2:** adds iterators2 exercise including config ([9288fccf](https://github.com/rust-lang/rustlings/commit/9288fccf07a2c5043b76d0fd6491e4cf72d76031)) - - ### 1.3.0 (2019-06-05) #### Features @@ -1000,16 +924,12 @@ Then follow the link to the guide about [third-party exercises](THIRD_PARTY_EXER - Fix broken link (#164, @HanKruiger) - Remove highlighting and syntect (#167, @komaeda) - - ### 1.2.2 (2019-05-07) #### Bug Fixes - Reverted `--nocapture` flag since it was causing tests to pass unconditionally - - ### 1.2.1 (2019-04-22) #### Bug Fixes @@ -1017,8 +937,6 @@ Then follow the link to the guide about [third-party exercises](THIRD_PARTY_EXER - Fix the `--nocapture` feature (@komaeda) - Provide a nicer error message for when you're in the wrong directory - - ### 1.2.0 (2019-04-22) #### Features @@ -1026,8 +944,6 @@ Then follow the link to the guide about [third-party exercises](THIRD_PARTY_EXER - Add errors to exercises that compile without user changes (@yvan-sraka) - Use --nocapture when testing, enabling `println!` when running (@komaeda) - - ### 1.1.1 (2019-04-14) #### Bug fixes @@ -1040,8 +956,6 @@ Then follow the link to the guide about [third-party exercises](THIRD_PARTY_EXER - Fix links by deleting book version (@diodfr, #142) - Canonicalize paths to fix path matching (@cjpearce, #143) - - ### 1.1.0 (2019-03-20) - errors2.rs: update link to Rust book (#124) @@ -1051,16 +965,12 @@ Then follow the link to the guide about [third-party exercises](THIRD_PARTY_EXER - Give a warning when Rustlings isn't run from the right directory (#123) - Verify that rust version is recent enough to install Rustlings (#131) - - ### 1.0.1 (2019-03-06) - Adds a way to install Rustlings in one command (`curl -L https://git.io/rustlings | bash`) - Makes `rustlings watch` react to create file events (@shaunbennett, #117) - Reworks the exercise management to use an external TOML file instead of just listing them in the code - - ### 1.0.0 (2019-03-06) Initial release. -- cgit v1.2.3 From a51d6f1309b986c270d781b08f6949f29806b18a Mon Sep 17 00:00:00 2001 From: mo8it Date: Sat, 17 May 2025 21:25:19 +0200 Subject: third-party/custom -> community --- CHANGELOG.md | 10 ++--- src/app_state.rs | 4 +- src/dev.rs | 2 +- src/dev/new.rs | 8 ++-- src/info_file.rs | 4 +- src/main.rs | 2 +- website/config.toml | 4 +- website/content/community-exercises/index.md | 65 +++++++++++++++++++++++++++ website/content/custom-exercises/index.md | 66 ---------------------------- website/content/usage/index.md | 2 +- 10 files changed, 83 insertions(+), 84 deletions(-) create mode 100644 website/content/community-exercises/index.md delete mode 100644 website/content/custom-exercises/index.md (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 6781ba8..c1dbb42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,7 +16,7 @@ - New option `x` in the prompt to reset the file of the current exercise πŸ”„ - Allow `dead_code` for all exercises and solutions ⚰️ (thanks to [@huss4in](https://github.com/huss4in)) - Pause input while running an exercise to avoid unexpected prompt interactions ⏸️ -- Limit the maximum number of exercises to 999. Any third-party exercises willing to reach that limit? πŸ” +- Limit the maximum number of exercises to 999. Any community exercises willing to reach that limit? πŸ” ### Changed @@ -93,7 +93,7 @@ #### Added -- `dev check`: Check that all exercises (including third-party ones) include at least one `TODO` comment. +- `dev check`: Check that all exercises (including community ones) include at least one `TODO` comment. - `dev check`: Check that all exercises actually fail to run (not already solved). #### Changed @@ -168,13 +168,13 @@ This should avoid issues related to the language server or to running exercises, Clippy lints are now shown on all exercises, not only the Clippy exercises πŸ“Ž Make Clippy your friend from early on πŸ₯° -### Third-party exercises +### Community Exercises -Rustlings now supports third-party exercises! +Rustlings now supports community 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](THIRD_PARTY_EXERCISES.md)! +Then follow the link to the guide about [community exercises](https://rustlings.rust-lang.org/community-exercises)! ## 5.6.1 (2023-09-18) diff --git a/src/app_state.rs b/src/app_state.rs index d1c45d4..f3f3481 100644 --- a/src/app_state.rs +++ b/src/app_state.rs @@ -315,7 +315,7 @@ impl AppState { } // Official exercises: Dump the original file from the binary. - // Third-party exercises: Reset the exercise file with `git stash`. + // Community exercises: Reset the exercise file with `git stash`. fn reset(&self, exercise_ind: usize, path: &str) -> Result<()> { if self.official_exercises { return EMBEDDED_FILES @@ -385,7 +385,7 @@ impl AppState { } /// Official exercises: Dump the solution file from the binary and return its path. - /// Third-party exercises: Check if a solution file exists and return its path in that case. + /// Community exercises: Check if a solution file exists and return its path in that case. pub fn current_solution_path(&self) -> Result> { if cfg!(debug_assertions) { return Ok(None); diff --git a/src/dev.rs b/src/dev.rs index 354d77c..41fddbe 100644 --- a/src/dev.rs +++ b/src/dev.rs @@ -8,7 +8,7 @@ mod update; #[derive(Subcommand)] pub enum DevCommands { - /// Create a new project for third-party Rustlings exercises + /// Create a new project for community exercises New { /// The path to create the project in path: PathBuf, diff --git a/src/dev/new.rs b/src/dev/new.rs index ba3517f..883b6fa 100644 --- a/src/dev/new.rs +++ b/src/dev/new.rs @@ -86,10 +86,10 @@ target/ "; const INFO_FILE_BEFORE_FORMAT_VERSION: &str = - "# The format version is an indicator of the compatibility of third-party exercises with the + "# The format version is an indicator of the compatibility of community exercises with the # Rustlings program. # The format version is not the same as the version of the Rustlings program. -# In case Rustlings makes an unavoidable breaking change to the expected format of third-party +# In case Rustlings makes an unavoidable breaking change to the expected format of community # exercises, you would need to raise this version and adapt to the new format. # Otherwise, the newest version of the Rustlings program won't be able to run these exercises. format_version = "; @@ -97,7 +97,7 @@ format_version = "; const INFO_FILE_AFTER_FORMAT_VERSION: &str = r#" # Optional multi-line message to be shown to users when just starting with the exercises. -welcome_message = """Welcome to these third-party Rustlings exercises.""" +welcome_message = """Welcome to these community Rustlings exercises.""" # Optional multi-line message to be shown to users after finishing all exercises. final_message = """We hope that you found the exercises helpful :D""" @@ -141,7 +141,7 @@ publish = false const README: &str = "# Rustlings πŸ¦€ -Welcome to these third-party Rustlings exercises πŸ˜ƒ +Welcome to these community Rustlings exercises πŸ˜ƒ First, [install Rustlings using the official instructions](https://github.com/rust-lang/rustlings) βœ… diff --git a/src/info_file.rs b/src/info_file.rs index ec61f8a..634bece 100644 --- a/src/info_file.rs +++ b/src/info_file.rs @@ -79,7 +79,7 @@ impl RunnableExercise for ExerciseInfo { /// The deserialized `info.toml` file. #[derive(Deserialize)] pub struct InfoFile { - /// For possible breaking changes in the future for third-party exercises. + /// For possible breaking changes in the future for community exercises. pub format_version: u8, /// Shown to users when starting with the exercises. pub welcome_message: Option, @@ -91,7 +91,7 @@ pub struct InfoFile { impl InfoFile { /// Official exercises: Parse the embedded `info.toml` file. - /// Third-party exercises: Parse the `info.toml` file in the current directory. + /// Community exercises: Parse the `info.toml` file in the current directory. pub fn parse() -> Result { // Read a local `info.toml` if it exists. let slf = match fs::read_to_string("info.toml") { diff --git a/src/main.rs b/src/main.rs index 6688e3e..bce2593 100644 --- a/src/main.rs +++ b/src/main.rs @@ -58,7 +58,7 @@ enum Subcommands { /// The name of the exercise name: Option, }, - /// Commands for developing (third-party) Rustlings exercises + /// Commands for developing (community) Rustlings exercises #[command(subcommand)] Dev(DevCommands), } diff --git a/website/config.toml b/website/config.toml index 8ecb09b..796f13a 100644 --- a/website/config.toml +++ b/website/config.toml @@ -24,8 +24,8 @@ url = "/setup" name = "Usage" url = "/usage" [[extra.menu_items]] -name = "Custom Exercises" -url = "/custom-exercises" +name = "Community Exercises" +url = "/community-exercises" [[extra.menu_items]] name = "Q&A" url = "https://github.com/rust-lang/rustlings/discussions/categories/q-a?discussions_q=" diff --git a/website/content/community-exercises/index.md b/website/content/community-exercises/index.md new file mode 100644 index 0000000..1c8cd57 --- /dev/null +++ b/website/content/community-exercises/index.md @@ -0,0 +1,65 @@ ++++ +title = "Community 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? + +## List of Community Exercises + +- πŸ‡―πŸ‡΅ [Japanese Rustlings](https://github.com/sotanengel/rustlings-jp):A Japanese translation of the Rustlings exercises. +- πŸ‡¨πŸ‡³ [Simplified Chinese Rustlings](https://github.com/SandmeyerX/rustlings-zh-cn): A simplified Chinese translation of the Rustlings exercises. + +You can use the same `rustlings` program that you installed with `cargo install rustlings` to run them + +The support of Rustlings for community exercises allows you to create your own set of Rustlings exercises to focus on some specific topic. +You could also offer a translation of the original Rustlings exercises as community exercises. + +## Getting started + +To create community exercises, install Rustlings and run `rustlings dev new PROJECT_NAME`. +This command will, similar to `cargo new PROJECT_NAME`, create a template directory called `PROJECT_NAME` with all what you need to get started. + +Read the comments in the generated `info.toml` file to understand its format. +It allows you to set a custom welcome and final message and specify the metadata of every exercise. + +## Create an exercise + +Here is an example of the metadata of one file: + +```toml +[[exercises]] +name = "intro1" +hint = """ +To finish this exercise, you need to … +This link might help you …""" +``` + +After entering this in `info.toml`, create the file `intro1.rs` in the `exercises/` directory. +The exercise needs to contain a `main` function, but it can be empty. +Adding tests is recommended. +Look at the official Rustlings exercises for inspiration. + +You can optionally add a solution file `intro1.rs` to the `solutions/` directory. + +Now, run `rustlings dev check`. +It will tell you about any issues with your exercises. +For example, it will tell you to run `rustlings dev update` to update the `Cargo.toml` file to include the new exercise `intro1`. + +`rustlings dev check` will also run your solutions (if you have any) to make sure that they run successfully. + +That's it! +You finished your first exercise πŸŽ‰ + +## Publish + +Now, add more exercises and publish them as a Git repository. + +Users just have to clone that repository and run `rustlings` in it to start working on your set of exercises just like the official ones. + +One difference to the official exercises is that the solution files will not be hidden until the user finishes an exercise. +But you can trust the users to not look at the solution too early πŸ˜‰ + +## Share + +After publishing your set of exercises, open an issue or a pull request in the official Rustlings repository to link to your project in the README πŸ˜ƒ diff --git a/website/content/custom-exercises/index.md b/website/content/custom-exercises/index.md deleted file mode 100644 index e8bef76..0000000 --- a/website/content/custom-exercises/index.md +++ /dev/null @@ -1,66 +0,0 @@ -+++ -title = "Custom Exercises" -+++ - -Custom 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: - -- πŸ‡―πŸ‡΅ [Japanese Rustlings](https://github.com/sotanengel/rustlings-jp):A Japanese translation of the Rustlings exercises. -- πŸ‡¨πŸ‡³ [Simplified Chinese Rustlings](https://github.com/SandmeyerX/rustlings-zh-cn): A simplified Chinese 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? - - - -The support of Rustlings for custom exercises allows you to create your own set of Rustlings exercises to focus on some specific topic. -You could also offer a translation of the original Rustlings exercises as custom exercises. - -## Getting started - -To create custom exercises, install Rustlings and run `rustlings dev new PROJECT_NAME`. -This command will, similar to `cargo new PROJECT_NAME`, create a template directory called `PROJECT_NAME` with all what you need to get started. - -Read the comments in the generated `info.toml` file to understand its format. -It allows you to set a custom welcome and final message and specify the metadata of every exercise. - -## Create an exercise - -Here is an example of the metadata of one file: - -```toml -[[exercises]] -name = "intro1" -hint = """ -To finish this exercise, you need to … -This link might help you …""" -``` - -After entering this in `info.toml`, create the file `intro1.rs` in the `exercises/` directory. -The exercise needs to contain a `main` function, but it can be empty. -Adding tests is recommended. -Look at the official Rustlings exercises for inspiration. - -You can optionally add a solution file `intro1.rs` to the `solutions/` directory. - -Now, run `rustlings dev check`. -It will tell you about any issues with your exercises. -For example, it will tell you to run `rustlings dev update` to update the `Cargo.toml` file to include the new exercise `intro1`. - -`rustlings dev check` will also run your solutions (if you have any) to make sure that they run successfully. - -That's it! -You finished your first exercise πŸŽ‰ - -## Publish - -Now, add more exercises and publish them as a Git repository. - -Users just have to clone that repository and run `rustlings` in it to start working on your set of exercises just like the official ones. - -One difference to the official exercises is that the solution files will not be hidden until the user finishes an exercise. -But you can trust the users to not look at the solution too early πŸ˜‰ - -## Share - -After publishing your set of exercises, open an issue or a pull request in the official Rustlings repository to link to your project in the README πŸ˜ƒ diff --git a/website/content/usage/index.md b/website/content/usage/index.md index 7bf02f5..88dabf4 100644 --- a/website/content/usage/index.md +++ b/website/content/usage/index.md @@ -52,4 +52,4 @@ If you need any help while doing the exercises and the builtin hints aren't help 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 create your own custom Rustlings exercises, visit the [**custom exercises**](@/custom-exercises/index.md) page πŸ—οΈ +> If you want to create your own Rustlings exercises, visit the [**community exercises**](@/community-exercises/index.md) page πŸ—οΈ -- cgit v1.2.3