Skip to content

100 challenges for rust (for beginers)/ 100个rust入门问题

Notifications You must be signed in to change notification settings

xwzy/100_challenges_for_rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

100_challenges_for_rust

In the process of learning various programming languages, "repeatedly starting from scratch" is a common challenge for many learners, especially for a systems programming language like Rust. Rust is renowned for its unique ownership model, zero-cost abstractions, and memory safety features, but these also make its learning curve relatively steep. Thus, many developers might find themselves having to start learning Rust from scratch after their initial attempt.

To address this issue, I have designed a 15-day Rust learning plan aimed at gradually immersing you into the world of Rust through 15 carefully selected topics. Each day, we will focus on one core topic and reinforce our learning outcomes through a series of practical tasks. Each task will come with corresponding answers and detailed explanations, so even when faced with challenges, you'll be able to find direction and answers.

Today, we will start with Rust's basic syntax, the cornerstone of any Rust project. Together, we will explore concepts such as variable bindings, functions, basic types, and comments, deepening our understanding through practical coding exercises. This foundational knowledge will lay a solid groundwork for the rest of the learning journey, enabling you to confidently explore Rust's advanced features in the next 14 days.

Below is the outline of content for these 15 days:

  1. Basic Syntax of Rust: Understand variable bindings, functions, basic types, comments, etc.

  2. Ownership: One of Rust's core concepts, including ownership rules, borrowing, lifetimes.

  3. Type System: Understand immutability, structs, enums, generics, and traits.

  4. Error Handling: Learn to handle potential errors using Result and Option enums.

  5. Pattern Matching: Master the use of match and if let for pattern matching.

  6. Collection Types: Get familiar with Rust's standard collection types, such as Vec, String, HashMap, etc.

  7. Iterators: Understand the use and creation of iterators and how they work with closures.

  8. Concurrent Programming: Learn about Rust's threads, message passing, shared state, and async/.await.

  9. Module System: Understand how to organize code and modules using mod and use.

  10. Package Management and Crates.io: Learn how to manage packages with Cargo and publish libraries on Crates.io.

  11. Macros: Understand the basics of macros and how they are used for code generation.

  12. FFI (Foreign Function Interface): Learn how to interact with code written in other languages using Rust.

  13. Testing: Master how to write tests to verify your code.

  14. Documentation: Learn how to write documentation comments for your code.

  15. Rust's Ecosystem: Become familiar with some popular Rust libraries and frameworks, and how to use them in your projects.

Releases

No releases published

Packages

No packages published