{"id":24777101,"url":"https://github.com/crabzie/rustling-solutions","last_synced_at":"2025-03-24T01:36:50.103Z","repository":{"id":255386992,"uuid":"849444169","full_name":"Crabzie/Rustling-Solutions","owner":"Crabzie","description":"🦀 Rustlings solutions by my personal approach","archived":false,"fork":false,"pushed_at":"2024-10-19T11:17:51.000Z","size":84,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-29T07:49:15.894Z","etag":null,"topics":["rust","rustlings","rustlings-solution"],"latest_commit_sha":null,"homepage":"","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/Crabzie.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-29T15:52:08.000Z","updated_at":"2024-10-19T11:17:54.000Z","dependencies_parsed_at":"2024-11-25T22:53:22.338Z","dependency_job_id":null,"html_url":"https://github.com/Crabzie/Rustling-Solutions","commit_stats":null,"previous_names":["cunbex/rustling-solutions","crabzie/rustling-solutions"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Crabzie%2FRustling-Solutions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Crabzie%2FRustling-Solutions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Crabzie%2FRustling-Solutions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Crabzie%2FRustling-Solutions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Crabzie","download_url":"https://codeload.github.com/Crabzie/Rustling-Solutions/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245195817,"owners_count":20575936,"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","rustlings","rustlings-solution"],"created_at":"2025-01-29T07:49:23.944Z","updated_at":"2025-03-24T01:36:50.086Z","avatar_url":"https://github.com/Crabzie.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv class=\"oranda-hide\"\u003e\n\n### Current progress\nProgress: 82/94 \u003cbr\u003e\nLatest Solved Exercise: `exercises/20_threads/thread3.rs` \u003cbr\u003e\nNext Exercise: `exercises/21_macros/macro1.rs` \u003cbr\u003e\n\n# rustlings 🦀❤️\n\n\u003c/div\u003e\n\nGreetings 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!\n\nFor a first-time Rust learner, there are several other resources:\n\n- [The Book](https://doc.rust-lang.org/book/index.html) - The most comprehensive resource for learning Rust, but a bit theoretical sometimes. You will be using this along with Rustlings!\n- [Rust By Example](https://doc.rust-lang.org/rust-by-example/index.html) - Learn Rust by solving little exercises! It's almost like `rustlings`, but online\n\n## Getting Started\n\n_Note: If you're on MacOS, make sure you've installed Xcode and its developer tools by typing `xcode-select --install`._\n_Note: If you're on Linux, make sure you've installed gcc. Deb: `sudo apt install gcc`. Yum: `sudo yum -y install gcc`._\n\nYou will need to have Rust installed. You can get it by visiting \u003chttps://rustup.rs\u003e. This'll also install Cargo, Rust's package/project manager.\n\n## MacOS/Linux\n\nJust run:\n\n```bash\ncurl -L https://raw.githubusercontent.com/rust-lang/rustlings/main/install.sh | bash\n```\n\nOr if you want it to be installed to a different path:\n\n```bash\ncurl -L https://raw.githubusercontent.com/rust-lang/rustlings/main/install.sh | bash -s mypath/\n```\n\nThis will install Rustlings and give you access to the `rustlings` command. Run it to get started!\n\n### Nix\n\nBasically: Clone the repository at the latest tag, finally run `nix develop` or `nix-shell`.\n\n```bash\n# find out the latest version at https://github.com/rust-lang/rustlings/releases/latest (on edit 5.6.1)\ngit clone -b 5.6.1 --depth 1 https://github.com/rust-lang/rustlings\ncd rustlings\n# if nix version \u003e 2.3\nnix develop\n# if nix version \u003c= 2.3\nnix-shell\n```\n\n## Windows\n\nIn PowerShell (Run as Administrator), set `ExecutionPolicy` to `RemoteSigned`:\n\n```ps1\nSet-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser\n```\n\nThen, you can run:\n\n```ps1\nStart-BitsTransfer -Source https://raw.githubusercontent.com/rust-lang/rustlings/main/install.ps1 -Destination $env:TMP/install_rustlings.ps1; Unblock-File $env:TMP/install_rustlings.ps1; Invoke-Expression $env:TMP/install_rustlings.ps1\n```\n\nTo install Rustlings. Same as on MacOS/Linux, you will have access to the `rustlings` command after it. Keep in mind that this works best in PowerShell, and any other terminals may give you errors.\n\nIf you get a permission denied message, you might have to exclude the directory where you cloned Rustlings in your antivirus.\n\n## Exercises Folder \u0026 Solutions Folder\n\nThe exercises solved by me 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 exercises solution provided by the Rustlings developer team can be found in the subdirectory `rustlings/solutions/\u003ctopic\u003e`. For every topic there is the developer team solution version which sometimes may differ than my solution.\n\nThe task is simple. Most exercises contain an error that keeps them 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 myExercise1\n```\n\nOr simply use the following command to run the next unsolved exercise in the course:\n\n```bash\nrustlings run next\n```\n\nIn case you get stuck, you can run the following command to get a hint for your\nexercise:\n\n```bash\nrustlings hint myExercise1\n```\n\nYou can also get the hint for the next unsolved exercise with the following command:\n\n```bash\nrustlings hint next\n```\n\nTo check your progress, you can run the following command:\n\n```bash\nrustlings list\n```\n\n## Testing yourself\n\nAfter every couple of sections, there will be a quiz that'll test your knowledge on a bunch of sections at once. These quizzes are found in `exercises/quizN.rs`.\n\n## Enabling `rust-analyzer`\n\nRun the command `rustlings lsp` which will generate a `rust-project.json` at the root of the project, this allows [rust-analyzer](https://rust-analyzer.github.io/) to parse each exercise.\n\n## Uninstalling Rustlings\n\nIf you want to remove Rustlings from your system, there are two steps. First, you'll need to remove the exercises folder that the install script created\nfor you:\n\n```bash\nrm -rf rustlings # or your custom folder name, if you chose and or renamed it\n```\n\nSecond, run `cargo uninstall` to remove the `rustlings` binary:\n\n```bash\ncargo uninstall rustlings\n```\n\nNow you should be done!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrabzie%2Frustling-solutions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrabzie%2Frustling-solutions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrabzie%2Frustling-solutions/lists"}