$ show sunface/rust-course
This repository is a comprehensive Chinese-language Rust tutorial titled 'Rust Course' (Rust 语言圣经). It is primarily an educational documentation project built with mdBook, producing a static website and a PDF. The content covers Rust from basic syntax to advanced topics like async, unsafe, concurrency, and performance optimization, with over 170 chapters and 1.1 million characters. It also includes a forked and translated version of the rustlings interactive exercise system (rustlings-zh), which provides a CLI tool for hands-on practice. The repository is not a production application but a learning resource; however, the rustlings-zh component is a functional CLI application. The architecture is a static site generator (mdBook) plus a standalone Rust CLI tool. Key entry points are the mdBook configuration (book.toml) and the rustlings-zh main.rs. The project is well-maintained, tracks Rust versions up to 1.89, and has active community contributions.
The LLM identified 3 files worth highlighting for reuse:
The main entry point for the rustlings-zh interactive exercise CLI. It parses command-line arguments (watch, verify, run, hint, list), manages exercise state, and provides a watch mode that automatically recompiles and tests exercises on file changes. This is a self-contained CLI framework that can be extracted and reused for any programming language exercise system, demonstrating a clean separation of concerns (exercise loading, compilation, verification, UI).
Defines the Exercise struct and logic for loading, parsing, and tracking exercise state. It reads exercise files, detects completion markers (// I AM NOT DONE), and manages pending/compiled/tested states. This module is reusable as a generic exercise engine for any language, with clear interfaces for file discovery and state transitions.
A custom Handlebars template for mdBook that overrides the default theme. It includes custom navigation, sidebar styling, and integration with JavaScript assets (bigPicture.js, custom.js). This template can be reused in any mdBook project to achieve a consistent look and feel, and demonstrates how to extend mdBook's rendering pipeline.