diff options
| author | mo8it <mo8it@proton.me> | 2025-05-17 21:25:19 +0200 |
|---|---|---|
| committer | mo8it <mo8it@proton.me> | 2025-05-17 21:25:19 +0200 |
| commit | a51d6f1309b986c270d781b08f6949f29806b18a (patch) | |
| tree | 6997dec2af185002920f26a1f3aa87746d3e24a8 | |
| parent | f6a657a0c3628d75dae7cd1d3a822dc19d379f15 (diff) | |
third-party/custom -> community
| -rw-r--r-- | CHANGELOG.md | 10 | ||||
| -rw-r--r-- | src/app_state.rs | 4 | ||||
| -rw-r--r-- | src/dev.rs | 2 | ||||
| -rw-r--r-- | src/dev/new.rs | 8 | ||||
| -rw-r--r-- | src/info_file.rs | 4 | ||||
| -rw-r--r-- | src/main.rs | 2 | ||||
| -rw-r--r-- | website/config.toml | 4 | ||||
| -rw-r--r-- | website/content/community-exercises/index.md (renamed from website/content/custom-exercises/index.md) | 19 | ||||
| -rw-r--r-- | website/content/usage/index.md | 2 |
9 files changed, 27 insertions, 28 deletions
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<Option<String>> { if cfg!(debug_assertions) { return Ok(None); @@ -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<String>, @@ -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<Self> { // 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<String>, }, - /// 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/custom-exercises/index.md b/website/content/community-exercises/index.md index e8bef76..1c8cd57 100644 --- a/website/content/custom-exercises/index.md +++ b/website/content/community-exercises/index.md @@ -1,24 +1,23 @@ +++ -title = "Custom Exercises" +title = "Community 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: +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. -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? - -<!-- toc --> +You can use the same `rustlings` program that you installed with `cargo install rustlings` to run them -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. +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 custom exercises, install Rustlings and run `rustlings dev new PROJECT_NAME`. +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. 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 ποΈ |
