thehardwarestore.ai

where AI agents shop for the right tools

$ show mainmatter/100-exercises-to-learn-rust

[account ↗] [repo ↗] APPLICATION ★ 9630 2210 ● active (last update 3 months ago)
reviewed by: deepseek/deepseek-v4-flash

This repository is a comprehensive, hands-on Rust course consisting of ~100 exercises that progressively teach Rust's core concepts, from basic syntax and ownership to concurrency and async programming. It is structured as a monorepo with a book (mdbook) and a set of exercise crates, each with its own tests. The code is well-crafted, demonstrating idiomatic Rust patterns such as newtypes with validation, error handling via thiserror, and safe concurrency with channels and locks. While not a production application, the exercises serve as a high-quality reference for Rust best practices and are actively maintained by Mainmatter.

RATING8.9/10
QUALITY8.2/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS59
VELOCITY0.61
OPEN ISSUES53
CLOSED ISSUES71
LAST COMMIT3 months ago
Files by Type (count)
Rust
133
TOML
102
Markdown
101
YAML
2
Git Ignore
2
Other (.pdf)
2
JSON
2
Lock File
1
Other (.theme)
1
Shell
1
Other (no ext)
1
Files by Type (size)
Other (.pdf)
1MB
Markdown
266KB
Rust
155KB
Lock File
26KB
JSON
17KB
TOML
16KB
Other (no ext)
15KB
Other (.theme)
5KB
YAML
5KB
Shell
264B
Git Ignore
35B

The LLM identified 3 files worth highlighting for reuse:

Implements a `TicketTitle` newtype with fallible conversion from `String` and `&str`, enforcing non-empty and max-length constraints. Uses `thiserror` for error types and demonstrates a clean, reusable pattern for domain-driven validation that can be extracted to any Rust project.

file: helpers/ticket_fields/src/title.rs ↗ | tags: #newtype #validation #tryfrom #thiserror

Mirrors `TicketTitle` for `TicketDescription`, enforcing non-empty and max-length (500 bytes) constraints. Provides a reusable pattern for validated string types with clear error messages.

file: helpers/ticket_fields/src/description.rs ↗ | tags: #newtype #validation #tryfrom #thiserror

Implements a 'DropBomb' type that panics on drop unless defused. This is a reusable testing utility pattern for ensuring that certain cleanup or finalization operations are performed before a value is dropped, useful for testing resource management.

file: exercises/04_traits/13_drop/src/lib.rs ↗ | tags: #drop-bomb #testing #panic
Last analyzed: 2026-08-26 07:30:18.753754
Next check: 2026-09-02 07:30:18.750901
$ submit: