{"id":22941843,"url":"https://github.com/zacksleo/exercism-rust","last_synced_at":"2025-10-13T15:08:17.693Z","repository":{"id":41954641,"uuid":"377074111","full_name":"zacksleo/exercism-rust","owner":"zacksleo","description":null,"archived":false,"fork":false,"pushed_at":"2023-01-30T12:05:12.000Z","size":3363,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-13T15:08:16.763Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zacksleo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2021-06-15T07:26:17.000Z","updated_at":"2021-07-04T14:49:19.000Z","dependencies_parsed_at":"2023-02-16T07:15:20.987Z","dependency_job_id":null,"html_url":"https://github.com/zacksleo/exercism-rust","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zacksleo/exercism-rust","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zacksleo%2Fexercism-rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zacksleo%2Fexercism-rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zacksleo%2Fexercism-rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zacksleo%2Fexercism-rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zacksleo","download_url":"https://codeload.github.com/zacksleo/exercism-rust/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zacksleo%2Fexercism-rust/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279015903,"owners_count":26085777,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-14T13:45:18.001Z","updated_at":"2025-10-13T15:08:17.648Z","avatar_url":"https://github.com/zacksleo.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Exercism Rust Track\n\n[![CI](https://github.com/exercism/rust/workflows/CI/badge.svg?branch=main)](https://github.com/exercism/rust/actions?query=workflow%3ACI+branch%3Amain)\n[![Join the chat at https://gitter.im/exercism/rust](https://badges.gitter.im/exercism/rust.svg)](https://gitter.im/exercism/rust?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\nExercism exercises in Rust\n\n## Contributing\n\nCheck out our [contributor documentation](docs/CONTRIBUTING.md).\n\n## Exercise Tests\n\nAt the most basic level, Exercism is all about the tests. You can read more about how we think about test suites in [the Exercism documentation](https://github.com/exercism/docs/blob/main/language-tracks/exercises/anatomy/test-suites.md).\n\nTest files should use the following format:\n\n```\nextern crate exercise_name;\n\nuse exercise_name::*;\n\n#[test]\nfn test_descriptive_name() {\n    assert_eq!(exercise_function(1), 1);\n}\n\n#[test]\n#[ignore]\nfn test_second_and_past_tests_ignored() {\n    assert_ne!(exercise_function(1), 2);\n}\n```\n\n## Opening an Issue\n\nIf you plan to make significant or breaking changes, please open an issue so we can discuss it first. If this is a discussion that is relevant to more than just the Rust track, please open an issue in [exercism/discussions](https://github.com/exercism/discussions/issues).\n\n## Submitting a Pull Request\n\nPull requests should be focused on a single exercise, issue, or conceptually cohesive change. Please refer to Exercism's [pull request guidelines](https://github.com/exercism/docs/blob/main/contributing/pull-request-guidelines.md).\n\nPlease follow the coding standards for Rust.  [rustfmt](https://github.com/nrc/rustfmt) may help with this\nand can be installed with `cargo install rustfmt`.\n\n### Verifying your Change\n\nBefore submitting your pull request, you'll want to verify the changes in two ways:\n\n* Run all the tests for the Rust exercises\n* Run an Exercism-specific linter to verify the track\n\nAll the tests for Rust exercises can be run from the top level of the repo with `_test/check_exercises.sh`. If you are on a Windows machine, there are additional [Windows-specific instructions](_test/WINDOWS_README.md) for running this.\n\n### On modifying the exercises' README\n\nPlease note that the README of every exercise is formed using several templates, not all of which are necessarily present on this repo. The most important of these:\n\n- The `description.md` file in the exercise directory from the [problem-specifications repository](https://github.com/exercism/problem-specifications/tree/main/exercises)\n\n- The `.meta/hints.md` file in the exercise directory on this repository\n\n- The [Rust-specific instructions](https://github.com/exercism/rust/blob/main/config/exercise-readme-insert.md)\n\nIf you are modifying the section of the README that belongs to the template not from this repository, please consider [opening a PR](https://github.com/exercism/problem-specifications/pulls) on the `problem-specifications` repository first.\n\n## Contributing a New Exercise\n\nPlease see the documentation about [adding new exercises](https://github.com/exercism/docs/blob/main/you-can-help/make-up-new-exercises.md).\n\nNote that:\n\n- The simplest way to generate, update or configure an exercise is to use the [exercise](https://github.com/exercism/rust/tree/main/util/exercise) utility provided in this repository. To compile the utility you can use the [bin/build_exercise_crate.sh](https://github.com/exercism/rust/tree/main/bin/build_exercise_crate.sh) script or, if the script does not work for you, use the `cargo build --release` command in the `util/exercise/` directory and then copy the `exercise` binary from the `util/exercise/target/release/` directory into the `bin/` directory. Use `bin/exercise --help` to learn about the existing commands and their possible usage.\n\n- Each exercise must stand on its own. Do not reference files outside the exercise directory. They will not be included when the user fetches the exercise.\n\n- Exercises must conform to the Exercism-wide standards described in [the documentation](https://github.com/exercism/docs/tree/main/language-tracks/exercises).\n\n- Each exercise should have:\n\n      exercises/exercise-name/\n                              tests/exercise-name.rs  \u003c- a test suite\n                              src/lib.rs              \u003c- an empty file or with exercise stubs\n                              example.rs              \u003c- example solution that satisfies tests\n                              Cargo.toml              \u003c- with version equal to exercise definition\n                              Cargo.lock              \u003c- Auto generated\n                              README.md               \u003c- Instructions for the exercise (see notes below)\n\n- The stub file and test suite should use only the Rust core libraries. `Cargo.toml` should not list any external dependencies as we don't want to make the student assume required crates. If an `example.rs` uses external crates, include `Cargo-example.toml` so that `_tests/check_exercises.sh` can compile with these when testing.\n\n- Except in extraordinary circumstances, the stub file should compile under `cargo test --no-run`.\n  This allows us to check that the signatures in the stub file match the signatures expected by the tests.\n  Use `unimplemented!()` as the body of each function to achieve this.\n  If there is a justified reason why this is not possible, instead include a `.meta/ALLOWED_TO_NOT_COMPILE` containing the reason.\n\n- If porting an existing exercise from problem-specifications that has a `canonical-data.json` file, use the version in `canonical-data.json` for that exercise as your `Cargo.toml` version.  Otherwise, use \"0.0.0\".\n\n- An exercise may contain `.meta/hints.md`.  This is optional and will appear after the normal exercise\n  instructions if present.  Rust is different in many ways from other languages.  This is a place where the differences required for Rust are explained.  If it is a large change, you may want to call this out as a comment at the top of `src/lib.rs`, so the user recognizes to read this section before starting.\n\n- If the test suite is appreciably sped up by running in release mode, and there is reason to be confident that the example implementation does not contain any overflow errors, consider adding a file `.meta/test-in-release-mode`. This should contain brief comments explaining the situation.\n\n- If your exercise implements macro-based testing (see [#392](https://github.com/exercism/rust/issues/392#issuecomment-343865993) and [`perfect-numbers.rs`](https://github.com/exercism/rust/blob/main/exercises/perfect-numbers/tests/perfect-numbers.rs)), you will likely run afoul of a CI check which counts the `#[ignore]` lines and compares the result to the number of `#[test]` lines. To fix this, add a file `.meta/ignore-count-ignores` to disable that check for your exercise.\n\n- `README.md` may be [regenerated](https://github.com/exercism/docs/blob/main/maintaining-a-track/regenerating-exercise-readmes.md) from Exercism data. The generator will use the `description.md` from the exercise directory in the [problem-specifications repository](https://github.com/exercism/problem-specifications/tree/main/exercises), then any hints in `.meta/hints.md`, then the [Rust-specific instructions](https://github.com/exercism/rust/blob/main/config/exercise-readme-insert.md). The `## Source` section comes from the `metadata.yml` in the same directory.  Convention is that the description of the source remains text and the link is both name and hyperlink of the markdown link.\n\n- Be sure to add the exercise to an appropriate place in the `config.json` file.  The position in the file determines the order exercises are sent.   Generate a unique UUID for the exercise.  Current difficulty levels in use are 1, 4, 7 and 10.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzacksleo%2Fexercism-rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzacksleo%2Fexercism-rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzacksleo%2Fexercism-rust/lists"}