[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-5451":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":25,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":35,"readmeContent":36,"aiSummary":37,"trendingCount":16,"starSnapshotCount":16,"syncStatus":17,"lastSyncTime":38,"discoverSource":39},5451,"rust-by-practice","sunface\u002Frust-by-practice","sunface","Learning Rust By Practice,  narrowing the gap between beginner and skilled-dev through challenging examples, exercises and projects.","https:\u002F\u002Fpractice.course.rs",null,"Rust",14389,1176,70,51,0,2,13,181,10,89.71,"Creative Commons Attribution 4.0 International",false,"master",true,[27,28,29,30,31,32,33,34],"example","examples","exercise","exercises","learning","practice","rust","study","2026-06-12 04:00:25","\u003Cdiv align=\"center\">\n    \u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fsunface\u002Frust-by-practice\u002Fblob\u002Fmaster\u002Fen\u002Fassets\u002Fheader.jpg?raw=true\">\n\u003C\u002Fdiv>\n\n\u003Cp align=\"center\">\n    \u003Cspan>English\u003C\u002Fspan>\n    \u003Cspan> | \u003C\u002Fspan>\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fsunface\u002Frust-by-practice\u002Fblob\u002Fmaster\u002Fzh-CN\u002Fsrc\u002Fwhy-exercise.md\">中文\u003C\u002Fa>\n\u003C\u002Fp>\n    \n\u003Cp align=\"center\">Practice Rust with challenging examples, exercises and projects\u003C\u002Fp>\n    \n\u003Cdiv align=\"center\">\n\n[![Stars Count](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fsunface\u002Frust-by-practice?style=flat)](https:\u002F\u002Fgithub.com\u002Fsunface\u002Frust-by-practice\u002Fstargazers) \n[![studyrut](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FRustCn-orange)](https:\u002F\u002Fhirust.cn) \n[![LICENSE](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-CC_BY_4.0-green?style=flat)](https:\u002F\u002Fgithub.com\u002Fsunface\u002Frust-by-practice\u002Fblob\u002Fmaster\u002FLICENSE)\n\u003C\u002Fdiv>\n\nThis book was designed for easily diving into and getting skilled with Rust It's very easy to use. All you need to do is to make each exercise compile without ERRORS and Panics!\n\n\n## Reading online\n\n- [https:\u002F\u002Fpractice.rs](https:\u002F\u002Fpractice.rs)\n\n## Features\n\nPart of our examples and exercises are borrowed from [Rust By Example](https:\u002F\u002Fgithub.com\u002Frust-lang\u002Frust-by-example), thanks for your great works!\n\nAlthough they are so awesome, we have our own secret weapons :)\n\n- There are three parts in each chapter: examples, exercises and practices\n\n- Besides examples, we have `a lot of exercises`, you can Read, Edit and Run them ONLINE\n\n- Covering nearly all aspects of Rust, such as async\u002Fawait, threads, sync primitives, optimizing, standard libraries, tool chain, data structures and algorithms etc.\n\n- Every exercise has its own solutions\n\n- The overall difficulties are a bit higher and from easy to super hard: easy 🌟 medium 🌟🌟 hard 🌟🌟🌟 super hard 🌟🌟🌟🌟\n\n**What we want to do is fill in the gap between learning and getting started with real projects.**\n\n## 🏅 Contributors\n\nThanks to all of our [contributors](https:\u002F\u002Fgithub.com\u002Fsunface\u002Frust-by-practice\u002Fgraphs\u002Fcontributors)!\n\n\u003Cbr \u002F>\n\n**🏆 Special thanks to our English editor:**\n\u003Ctable>\n    \u003Ctr>\n        \u003Ctd align=\"center\">\n            \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FTanish-Eagle\">\n                \u003Cimg src=\"https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F71984506?v=4?s=100\" width=\"160px\"   alt=\"\"\u002F>\n                \u003Cbr \u002F>\n                \u003Csub>\u003Cb>Tanish-Eagle\u003C\u002Fb>\u003C\u002Fsub>\n            \u003C\u002Fa>\n        \u003C\u002Ftd>\n    \u003C\u002Ftr>\n\u003C\u002Ftable>\n\n\u003Cbr \u002F>\n\n## Running locally\n\nWe use [mdbook](https:\u002F\u002Frust-lang.github.io\u002FmdBook\u002F) building our exercises. You can run locally with below steps:\n\n- Clone the repo\n```shell\n$ git clone https:\u002F\u002Fgithub.com\u002Fsunface\u002Frust-by-practice\n```\n- Install mdbook using Cargo\n```shell\n$ cargo install mdbook\n```\n\n- For Book in English\n```shell\n$ cd rust-by-practice && mdbook serve en\u002F\n```\n\n- For Book in Chinese\n```shell\n$ cd rust-by-practice && mdbook serve zh-CN\u002F\n```\n\n## Some of our exercises\n\n🌟🌟🌟 Tuple struct looks similar to tuples, it has added meaning the struct name provides but has no named fields. It's useful when you want give the whole tuple a name, but don't care the fields's names.\n\n```rust\n\n\u002F\u002F fix the error and fill the blanks\nstruct Color(i32, i32, i32);\nstruct Point(i32, i32, i32);\nfn main() {\n    let v = Point(___, ___, ___);\n    check_color(v);\n}\n\nfn check_color(p: Color) {\n    let (x, _, _) = p;\n    assert_eq!(x, 0);\n    assert_eq!(p.1, 127);\n    assert_eq!(___, 255);\n }\n```\n\n🌟🌟 Within the destructuring of a single variable, both by-move and by-reference pattern bindings can be used at the same time. Doing this will result in a partial move of the variable, which means that parts of the variable will be moved while other parts stay. In such a case, the parent variable cannot be used afterwards as a whole, however the parts that are only referenced (and not moved) can still be used.\n```rust\n\n\u002F\u002F fix errors to make it work\n#[derive(Debug)]\nstruct File {\n    name: String,\n    data: String,\n}\nfn main() {\n    let f = File {\n        name: String::from(\"readme.md\"),\n        data: \"Rust By Practice\".to_string()\n    };\n\n    let _name = f.name;\n\n    \u002F\u002F ONLY modify this line\n    println!(\"{}, {}, {:?}\",f.name, f.data, f);\n}\n```\n\n🌟🌟 A match guard is an additional if condition specified after the pattern in a match arm that must also match, along with the pattern matching, for that arm to be chosen.\n```rust,editable\n\n\u002F\u002F fill in the blank to make the code work, `split` MUST be used\nfn main() {\n    let num = Some(4);\n    let split = 5;\n    match num {\n        Some(x) __ => assert!(x \u003C split),\n        Some(x) => assert!(x >= split),\n        None => (),\n    }\n}\n```\n","该项目通过具有挑战性的示例、练习和项目帮助学习者掌握Rust编程语言，旨在缩小初学者与熟练开发者之间的差距。核心功能包括丰富的在线可读、编辑和运行的练习题，涵盖Rust几乎所有的方面，如异步\u002F等待、线程、同步原语、优化、标准库、工具链、数据结构与算法等。每个章节分为示例、练习和实践三部分，并提供详细的解答。适合希望通过实际编码来提升Rust技能的学习者以及准备将所学知识应用于真实项目的开发者使用。","2026-06-11 03:03:26","top_language"]