{"id":20012812,"url":"https://github.com/hijiangtao/learn-rust-with-rustlings","last_synced_at":"2025-05-04T21:31:42.992Z","repository":{"id":42125514,"uuid":"189035545","full_name":"hijiangtao/learn-rust-with-rustlings","owner":"hijiangtao","description":"🎉 Rustlings Solutions (Rustlings 解题集)","archived":false,"fork":false,"pushed_at":"2022-04-12T15:37:35.000Z","size":45,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-08T12:21:09.394Z","etag":null,"topics":["rust","rust-lang","rust-library","rustlings","rustlings-solution","solutions"],"latest_commit_sha":null,"homepage":"https://github.com/hijiangtao","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/hijiangtao.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-28T13:38:16.000Z","updated_at":"2023-06-26T15:11:38.000Z","dependencies_parsed_at":"2022-08-12T07:20:17.695Z","dependency_job_id":null,"html_url":"https://github.com/hijiangtao/learn-rust-with-rustlings","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hijiangtao%2Flearn-rust-with-rustlings","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hijiangtao%2Flearn-rust-with-rustlings/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hijiangtao%2Flearn-rust-with-rustlings/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hijiangtao%2Flearn-rust-with-rustlings/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hijiangtao","download_url":"https://codeload.github.com/hijiangtao/learn-rust-with-rustlings/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252404153,"owners_count":21742505,"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","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":["rust","rust-lang","rust-library","rustlings","rustlings-solution","solutions"],"created_at":"2024-11-13T07:33:26.106Z","updated_at":"2025-05-04T21:31:41.704Z","avatar_url":"https://github.com/hijiangtao.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# learn-rust-with-rustlings\n\n## README (EN)\n\nSmall exercises to get you used to reading and writing Rust code. Includes practice reading and responding to compiler messages! \n\nThis repo is my rustlings' solution collection. Hope it can help you more or less. :)\n\n**🎉 Successfully compiled all rustlings exercises! All the answers can be found in corresponding folders.** For example, you can check file `exercises/strings/strings1.rs` to read my solution about `strings` chapter.\n\n* ✅ if\n* ✅ functions\n* ✅ variables\n* ✅ primitive_types\n* ✅ strings\n* ✅ modules\n* ✅ macros\n* ✅ move_semantics\n* ✅ error_handling\n* ✅ threads\n* ✅ standard_library_types\n\n## README (CN)\n\n**🎉 Rust 学习之 Rustlings 训练答案集，所有训练均已完成。**\n\n内容在具体的文件中可以查看，比如 `strings` 为已完成状态，则对应 `exercises/strings/strings1.rs` 文件中代码即为答案，以下为训练分章节目录。\n\n* ✅ if\n* ✅ functions\n* ✅ variables\n* ✅ primitive_types\n* ✅ strings\n* ✅ modules\n* ✅ macros\n* ✅ move_semantics\n* ✅ error_handling\n* ✅ threads\n* ✅ standard_library_types\n\n## Manually Installation\n\nBasically: Clone the repository, checkout to the latest tag, run `cargo install`.\n\n```bash\ngit clone https://github.com/hijiangtao/learn-rust-with-rustlings\ncd learn-rust-with-rustlings\ncargo install --force --path .\n```\n\nIf there are installation errors, ensure that your toolchain is up to date. For the latest, run:\n```bash\nrustup update\n```\n\nThen, same as above, run `rustlings` to get started.\n\n## Doing exercises\n\nThe exercises are sorted by topic and can be found in the subdirectory `rustlings/exercises/\u003ctopic\u003e`. For every topic there is an additional README file with some resources to get you started on the topic. We really recommend that you have a look at them before you start.\n\nThe task is simple. Most exercises contain an error that keep it from compiling, and it's up to you to fix it! Some exercises are also run as tests, but rustlings handles them all the same. To run the exercises in the recommended order, execute:\n\n```bash\nrustlings watch\n```\n\nThis will try to verify the completion of every exercise in a predetermined order (what we think is best for newcomers). It will also rerun automatically every time you change a file in the `exercises/` directory. If you want to only run it once, you can use:\n\n```bash\nrustlings verify\n```\n\nThis will do the same as watch, but it'll quit after running.\n\nIn case you want to go by your own order, or want to only verify a single exercise, you can run:\n\n```bash\nrustlings run exercises/path/to/exercise.rs\n```\n\nIn case you get stuck, there is usually a hint at the bottom of each exercise.\n\n## Testing yourself\n\nAfter every couple of sections, there will be a test that'll test your knowledge on a bunch of sections at once. These tests are found in `exercises/testN.rs`.\n\n## Contact\n\n[@hijiangtao](https://github.com/hijiangtao)\n\n## LICENSE\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhijiangtao%2Flearn-rust-with-rustlings","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhijiangtao%2Flearn-rust-with-rustlings","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhijiangtao%2Flearn-rust-with-rustlings/lists"}