RepoPilotOpen in app →

sunface/rust-course

什么?你敢放心的把后背交给 AI? 我赌你不敢,那就来学学 AI 时代最安全的语言吧(Python无法战胜!)。本书拥有全面且深入的讲解、生动贴切的示例、德芙般丝滑的内容,这可能是目前最用心的 Rust 中文学习教程 / Book

Mixed

Missing license — unclear to depend on

weakest axis
Use as dependencyConcerns

no license — legally unclear

Fork & modifyConcerns

no license — can't legally use code

Learn fromHealthy

Documented and popular — useful reference codebase to read through.

Deploy as-isConcerns

no license — can't legally use code

  • Last commit 1w ago
  • 24+ active contributors
  • CI configured
Show all 6 evidence items →
  • Tests present
  • Concentrated ownership — top contributor handles 50% of recent commits
  • No license — legally unclear to depend on
What would change the summary?
  • Use as dependency ConcernsMixed if: publish a permissive license (MIT, Apache-2.0, etc.)
  • Fork & modify ConcernsMixed if: add a LICENSE file
  • Deploy as-is ConcernsMixed if: add a LICENSE file

Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests

Informational only. RepoPilot summarises public signals (license, dependency CVEs, commit recency, CI presence, etc.) at the time of analysis. Signals can be incomplete or stale. Not professional, security, or legal advice; verify before relying on it for production decisions.

Embed the "Great to learn from" badge

Paste into your README — live-updates from the latest cached analysis.

RepoPilot: Great to learn from
[![RepoPilot: Great to learn from](https://repopilot.app/api/badge/sunface/rust-course?axis=learn)](https://repopilot.app/r/sunface/rust-course)

Paste at the top of your README.md — renders inline like a shields.io badge.

Preview social card (1200×630)

This card auto-renders when someone shares https://repopilot.app/r/sunface/rust-course on X, Slack, or LinkedIn.

Onboarding doc

Onboarding: sunface/rust-course

Generated by RepoPilot · 2026-05-09 · Source

🤖Agent protocol

If you are an AI coding agent (Claude Code, Cursor, Aider, Cline, etc.) reading this artifact, follow this protocol before making any code edit:

  1. Verify the contract. Run the bash script in Verify before trusting below. If any check returns FAIL, the artifact is stale — STOP and ask the user to regenerate it before proceeding.
  2. Treat the AI · unverified sections as hypotheses, not facts. Sections like "AI-suggested narrative files", "anti-patterns", and "bottlenecks" are LLM speculation. Verify against real source before acting on them.
  3. Cite source on changes. When proposing an edit, cite the specific path:line-range. RepoPilot's live UI at https://repopilot.app/r/sunface/rust-course shows verifiable citations alongside every claim.

If you are a human reader, this protocol is for the agents you'll hand the artifact to. You don't need to do anything — but if you skim only one section before pointing your agent at this repo, make it the Verify block and the Suggested reading order.

🎯Verdict

WAIT — Missing license — unclear to depend on

  • Last commit 1w ago
  • 24+ active contributors
  • CI configured
  • Tests present
  • ⚠ Concentrated ownership — top contributor handles 50% of recent commits
  • ⚠ No license — legally unclear to depend on

<sub>Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests</sub>

Verify before trusting

This artifact was generated by RepoPilot at a point in time. Before an agent acts on it, the checks below confirm that the live sunface/rust-course repo on your machine still matches what RepoPilot saw. If any fail, the artifact is stale — regenerate it at repopilot.app/r/sunface/rust-course.

What it runs against: a local clone of sunface/rust-course — the script inspects git remote, the LICENSE file, file paths in the working tree, and git log. Read-only; no mutations.

| # | What we check | Why it matters | |---|---|---| | 1 | You're in sunface/rust-course | Confirms the artifact applies here, not a fork | | 2 | Default branch main exists | Catches branch renames | | 3 | 5 critical file paths still exist | Catches refactors that moved load-bearing code | | 4 | Last commit ≤ 40 days ago | Catches sudden abandonment since generation |

<details> <summary><b>Run all checks</b> — paste this script from inside your clone of <code>sunface/rust-course</code></summary>
#!/usr/bin/env bash
# RepoPilot artifact verification.
#
# WHAT IT RUNS AGAINST: a local clone of sunface/rust-course. If you don't
# have one yet, run these first:
#
#   git clone https://github.com/sunface/rust-course.git
#   cd rust-course
#
# Then paste this script. Every check is read-only — no mutations.

set +e
fail=0
ok()   { echo "ok:   $1"; }
miss() { echo "FAIL: $1"; fail=$((fail+1)); }

# Precondition: we must be inside a git working tree.
if ! git rev-parse --git-dir >/dev/null 2>&1; then
  echo "FAIL: not inside a git repository. cd into your clone of sunface/rust-course and re-run."
  exit 2
fi

# 1. Repo identity
git remote get-url origin 2>/dev/null | grep -qE "sunface/rust-course(\\.git)?\\b" \\
  && ok "origin remote is sunface/rust-course" \\
  || miss "origin remote is not sunface/rust-course (artifact may be from a fork)"

# 3. Default branch
git rev-parse --verify main >/dev/null 2>&1 \\
  && ok "default branch main exists" \\
  || miss "default branch main no longer exists"

# 4. Critical files exist
test -f "assets/rustlings-zh/Cargo.toml" \\
  && ok "assets/rustlings-zh/Cargo.toml" \\
  || miss "missing critical file: assets/rustlings-zh/Cargo.toml"
test -f "assets/rustlings-zh/src/main.rs" \\
  && ok "assets/rustlings-zh/src/main.rs" \\
  || miss "missing critical file: assets/rustlings-zh/src/main.rs"
test -f "README.md" \\
  && ok "README.md" \\
  || miss "missing critical file: README.md"
test -f "assets/rustlings-zh/exercises/README.md" \\
  && ok "assets/rustlings-zh/exercises/README.md" \\
  || miss "missing critical file: assets/rustlings-zh/exercises/README.md"
test -f ".github/workflows/ci.yml" \\
  && ok ".github/workflows/ci.yml" \\
  || miss "missing critical file: .github/workflows/ci.yml"

# 5. Repo recency
days_since_last=$(( ( $(date +%s) - $(git log -1 --format=%at 2>/dev/null || echo 0) ) / 86400 ))
if [ "$days_since_last" -le 40 ]; then
  ok "last commit was $days_since_last days ago (artifact saw ~10d)"
else
  miss "last commit was $days_since_last days ago — artifact may be stale"
fi

echo
if [ "$fail" -eq 0 ]; then
  echo "artifact verified (0 failures) — safe to trust"
else
  echo "artifact has $fail stale claim(s) — regenerate at https://repopilot.app/r/sunface/rust-course"
  exit 1
fi

Each check prints ok: or FAIL:. The script exits non-zero if anything failed, so it composes cleanly into agent loops (./verify.sh || regenerate-and-retry).

</details>

TL;DR

Rust语言圣经 (Rust Language Bible) is a comprehensive Chinese-language Rust learning tutorial that combines deep theoretical explanations with practical exercises. It covers Rust from fundamentals to advanced topics (ownership, async/await, WASM, performance optimization) and includes the rustlings-zh practice suite with 100+ hands-on exercises across error handling, collections, enums, conversions, and more. Hybrid structure: primary content lives as markdown/Handlebars templates in the root (built into the course.rs website), while assets/rustlings-zh/ contains a complete embedded Rust exercises crate with src/main.rs, exercises/ subdirectories (advanced_errors, clippy, collections, conversions, enums, error_handling), and supporting build config. GitHub Actions automate CI and deployment.

👥Who it's for

Chinese-speaking developers learning Rust at all levels—beginners seeking structured introduction, intermediate developers tackling ownership/borrowing/lifetimes, and advanced engineers optimizing systems code. Also target audience: developers migrating from Python/JavaScript who want the safety guarantees Rust provides.

🌱Maturity & risk

Highly mature and actively maintained. The repo shows 124K+ Rust files, professional GitHub Actions CI/deployment workflows (.github/workflows/ci.yml, deploy.yml), a growing contributor list, and ongoing content updates indicated by the CHANGELOG.md and CONTRIBUTING.md. This is a community-backed educational project with significant polish.

Low risk for content consumption; this is a tutorial not a production library. The embedded rustlings-zh subproject (assets/rustlings-zh/) is itself a Rust compiler, so its dependency health matters—it has Cargo.lock pinned dependencies (toml, serde, regex, notify) from 2021-era. The main risk is tutorial content can become stale as Rust evolves, though active maintenance appears to mitigate this.

Active areas of work

Active maintenance on both tutorial content and exercises. The presence of CHANGELOG.md, multiple contributors listed, and recent .github/workflows/ suggest ongoing content expansion and exercise refinement. The Rust version targeting edition 2021 in Cargo.toml indicates recent modernization.

🚀Get running

Clone and explore locally: git clone https://github.com/sunface/rust-course.git && cd rust-course. To run exercises: cd assets/rustlings-zh && cargo build. To read the tutorial: visit https://course.rs (the primary online interface). To work exercises locally: cd assets/rustlings-zh/exercises and open individual .rs files in your editor.

Daily commands: For the exercise crate: cd assets/rustlings-zh && cargo run --bin rustlings watch (watches and runs exercises interactively, per default_out.txt example output). For website locally: requires mdBook (cargo install mdbook) then mdbook serve at repo root. Most users consume via https://course.rs.

🗺️Map of the codebase

  • assets/rustlings-zh/Cargo.toml — Root manifest defining the rustlings CLI application, dependencies (argh, indicatif, notify, toml, serde, regex), and binary entry point—essential for understanding build configuration and external tool integrations.
  • assets/rustlings-zh/src/main.rs — Main entry point for the rustlings CLI tool; all contributors must understand the application's initialization and command dispatch logic.
  • README.md — Overview of the Rust language learning course (Rust语言圣经); defines the repository's educational mission, scope, and learning path for all stakeholders.
  • assets/rustlings-zh/exercises/README.md — Master index for all Rustlings exercises; critical for navigating and understanding the exercise structure and progression.
  • .github/workflows/ci.yml — Continuous integration pipeline configuration; essential for understanding automated testing, linting, and deployment triggers.
  • .github/workflows/deploy.yml — Deployment workflow configuration; necessary for understanding how the course is published and delivered to readers.

🧩Components & responsibilities

  • Rustlings CLI (Rust, argh (CLI), indicatif (progress), notify (file watching), toml) — Orchestrates exercise discovery, loading, compilation, and feedback delivery; implements the learning workflow.

🛠️How to make changes

Add a New Exercise Topic

  1. Create a new exercise directory under assets/rustlings-zh/exercises/ (assets/rustlings-zh/exercises/)
  2. Add a README.md with topic description and progression notes (assets/rustlings-zh/exercises/[topic]/README.md)
  3. Create graduated exercise files (topic1.rs, topic2.rs, etc.) following naming convention (assets/rustlings-zh/exercises/[topic]/[topic]N.rs)
  4. Update the master exercises README.md to include the new topic in the progression guide (assets/rustlings-zh/exercises/README.md)

Add Course Content/Chapter

  1. Create a new markdown file in the course directory (typically at root level or subdirectory) (README.md)
  2. Include explanatory text, code examples, and links to related exercises ([chapter-name].md)
  3. Link from main README.md or a table of contents to make it discoverable (README.md)
  4. Run deploy workflow to publish changes to course.rs (.github/workflows/deploy.yml)

Update & Test Rustlings CLI Tool

  1. Modify source code in the rustlings CLI application (assets/rustlings-zh/src/main.rs)
  2. Update Cargo.toml if new dependencies are required (assets/rustlings-zh/Cargo.toml)
  3. Run CI pipeline locally or push to trigger automated testing (.github/workflows/ci.yml)
  4. Validate exercise discovery and execution with cargo run (assets/rustlings-zh/Cargo.lock)

Contribute a Code Fix or Enhancement

  1. Review CONTRIBUTING.md for project guidelines and code style (assets/rustlings-zh/CONTRIBUTING.md)
  2. Make changes respecting .editorconfig settings for consistency (assets/rustlings-zh/.editorconfig)
  3. Ensure changes pass CI checks defined in ci.yml (.github/workflows/ci.yml)
  4. Update .all-contributorsrc if this is your first contribution (assets/rustlings-zh/.all-contributorsrc)

🔧Why these technologies

  • Rust language & Cargo — The repo teaches Rust; rustlings exercises are native Rust binaries that compile and validate learning outcomes with the Rust compiler.
  • GitHub Actions (CI/CD) — Automates testing of exercises, linting of code, and deployment of the course website to ensure quality and availability.
  • Markdown (content delivery) — Readable, versionable, and convertible to static HTML for the course.rs website; separates narrative from code.
  • JavaScript (web enhancements) — Enhances the course.rs browsing experience with interactive diagrams (bigPicture.js) and custom interactivity (custom.js).
  • argh, indicatif, console, notify, toml, serde, regex — Core dependencies: CLI parsing (argh), progress indicators (indicatif), file watching (notify), TOML config parsing (toml), serialization (serde), and pattern matching (regex).

⚖️Trade-offs already made

  • Exercise validation via local Rust compiler rather than cloud-based testing

    • Why: Keeps the workflow offline and fast; learners get immediate feedback without network latency.
    • Consequence: Requires Rust toolchain installation; learners must have local development environment configured.
  • Static markdown-based course content rather than dynamic wiki or database

    • Why: Content is version-controlled, collaborative (via git), and easily published as static HTML.
    • Consequence: Requires manual updates and coordination; less real-time collaboration than a collaborative editing platform.
  • Monolithic GitHub repository combining CLI tool and course materials

    • Why: Keeps exercises and tooling synchronized; single source of truth for both content and validator.
    • Consequence: Larger repository; tighter coupling; separate deployment pipelines for CLI vs. web content.

🚫Non-goals (don't propose these)

  • This is not an IDE or advanced development environment—it is a focused, self-contained learning tool.
  • No multi-user collaboration, live coding sessions, or instructor dashboards—learners work independently.
  • No authentication or progress tracking database—the course is stateless and open-access.
  • Not designed for advanced Rust topics beyond 'up to proficiency'—focuses on foundational to intermediate mastery.

🪤Traps & gotchas

No hidden traps specific to consuming the tutorial online. However, when using rustlings-zh locally: (1) Requires Rust toolchain installed (rustup); (2) The exercises are designed to fail compilation intentionally—don't be alarmed, that's the learning mechanism. (3) The toml/serde/regex dependencies in Cargo.toml are from 2021; if you modify exercises, you may encounter version conflicts with newer Rust nightly. (4) The .replit and .gitpod.yml files suggest cloud IDE support, but are not required locally.

🏗️Architecture

💡Concepts to learn

  • Ownership & Borrowing — Rust's core differentiator vs. Python/JS—this tutorial deeply explains how ownership transfers, borrows, and lifetimes prevent memory unsafety without garbage collection, which is foundational to every exercise.
  • Trait System (From/Into/TryFrom) — Covered in exercises/conversions/; Rust's zero-cost abstraction mechanism for polymorphism and type conversions—essential for writing idiomatic, reusable code.
  • Error Handling (Result/Option) — Rust replaces exceptions with Result<T, E> and Option<T> enums (exercises/error_handling/ has 6+ dedicated problems); compositional error handling is alien to Python developers and critical to master.
  • Lifetimes — Explicit lifetime annotations (&'a T) are unique to Rust and solve the borrow checker's challenge of reference validity; the tutorial promises 'deep explanations' on this notoriously confusing topic.
  • Async/Await & Tokio — Mentioned as a major专题 (specialty topic) in the README; Rust's futures-based concurrency model differs fundamentally from Python's asyncio and requires understanding pinning, executors, and select! macros.
  • Memory Layout & WASM — The tutorial advertises WASM专题; understanding how Rust compiles to WebAssembly (no garbage collector, tight memory budget, JS FFI) is critical for frontend systems work.
  • Clippy Linting & Cargo Ecosystem — exercises/clippy/ directory teaches idiomatic Rust patterns via compiler warnings; Cargo.toml, workspace management, and dependency curation are covered in '使用指南' mentioned in README.
  • sunface/rust-by-practice — Official companion repo providing additional hands-on Rust exercises and practice problems indexed by topic; directly mentioned in README as the '配套练习题' (accompanying practice questions).
  • rust-lang/rustlings — The original English-language rustlings project; assets/rustlings-zh is a Chinese fork/adaptation of this repository for interactive Rust learning via guided exercises.
  • nrc/r4cppp — Rust for C++ Programmers—relevant for the overlap audience migrating from systems languages; complements the Rust圣经 for comparative learning.
  • rustlang-cn/forum — Community forum (per badge links in README); ecosystem companion for discussion, troubleshooting, and cultural context around Chinese Rust adoption.
  • tokio-rs/tokio — The async runtime heavily discussed in the 圣经 (mentioned in README as Cargo/Tokio usage guide topics); essential for understanding the advanced async/await content.

🪄PR ideas

To work on one of these in Claude Code or Cursor, paste: Implement the "<title>" PR idea from CLAUDE.md, working through the checklist as the task list.

Add comprehensive integration tests for rustlings exercise verification

The repo contains rustlings-zh exercises across multiple categories (functions, enums, error_handling, etc.) but the dev-dependencies only include basic assertion tools (assert_cmd, predicates, glob). There are no visible integration tests verifying that each exercise file compiles and fails/passes correctly. This is critical for a learning resource where code quality directly impacts student experience.

  • [ ] Create tests/integration_tests.rs to validate each exercise in assets/rustlings-zh/exercises/* compiles
  • [ ] Add test cases in Cargo.toml dev-dependencies if needed (likely just need existing ones)
  • [ ] Create test matrix covering: functions/, enums/, error_handling/, conversions/, and generics/ exercise categories
  • [ ] Verify exercises fail with TODO comments and pass when completed
  • [ ] Add GitHub Actions step in .github/workflows/ci.yml to run these integration tests

Create automated Chinese content quality checks in CI pipeline

This is a Chinese Rust learning resource (Rust语言圣经) with extensive markdown content, but there's no CI validation for common Chinese technical writing issues (missing spaces between Chinese/English, incorrect punctuation, formatting inconsistencies). The deploy.yml and ci.yml workflows are minimal and don't validate content quality, which matters for an educational resource.

  • [ ] Add a GitHub Actions workflow step in .github/workflows/ci.yml using a linter like mdformat or chinese-copywriting-guide-for-effective-writing
  • [ ] Configure rules for: spacing between Chinese and English characters, consistent heading styles, proper punctuation in Chinese text
  • [ ] Apply linting to all markdown files in the main course content directory (referenced in README as course.rs)
  • [ ] Create a CONTRIBUTING.md section documenting content style guidelines (currently file structure shows no contributing guide in root)

Add structured exercise metadata and validation system

The exercises are scattered across assets/rustlings-zh/exercises/ directories with inconsistent naming (enums1.rs, hashmap1.rs, etc.) but no central registry or metadata file mapping exercises to their difficulty level, prerequisite concepts, or learning objectives. For an educational resource, this metadata would enable better course scaffolding and student progress tracking.

  • [ ] Create assets/rustlings-zh/exercises/MANIFEST.toml with exercise metadata: name, difficulty (beginner/intermediate/advanced), concepts_covered, and estimated_time_minutes
  • [ ] Populate metadata for all existing exercises across 10+ categories (functions, enums, error_handling, collections, etc.)
  • [ ] Add schema validation in src/lib.rs or create a Rust validator script that checks MANIFEST.toml against actual exercise files on build
  • [ ] Document this in assets/rustlings-zh/CONTRIBUTING.md so new contributors know how to register new exercises

🌿Good first issues

  • Add missing README.md documentation for exercises/conversions/ explaining trait implementations (From/Into/TryFrom) with concrete examples—currently only has exercise files, no pedagogical context file.
  • Create integration tests for assets/rustlings-zh/exercises/ to auto-verify that all exercise .rs files compile/run after fixing (currently exercises rely on manual verification via the CLI).
  • Expand assets/custom.js with a progress tracker widget showing which exercise categories (error_handling, enums, etc.) the user has completed—useful for long-form tutorial navigation.

Top contributors

Click to expand

📝Recent commits

Click to expand
  • b89a0a4 — Merge pull request #1605 from skylunna/docs/fix-user-struct-mutability (SnowballXueQiu)
  • 978c93a — Merge pull request #1606 from kjasn/main (SnowballXueQiu)
  • 83ecbef — doc: add the missing semicolon (kjasn)
  • e79f70b — docs: clarify mutability of String fields in User struct (skylunna)
  • f924331 — Update too-long2.md (sunface)
  • 4e5f403 — Update too-long2.md (sunface)
  • ec3161f — Update aws-rust.md (sunface)
  • 1473070 — Update intro.md (sunface)
  • e585db3 — Update intro.md (sunface)
  • d3b95c7 — Update aws-rust.md (sunface)

🔒Security observations

The codebase is a Rust educational repository with moderate security posture. The primary concerns are outdated dependencies, particularly 'notify' and 'toml', which are used for file watching and configuration parsing respectively. No hardcoded secrets, injection risks, or infrastructure misconfigurations were identified in the provided file structure. The project follows good practices by using serde for safe serialization. The main recommendation is to update all dependencies to their latest stable versions to ensure security patches are applied. The codebase itself appears to be an educational resource without complex security-sensitive operations beyond dependency management.

  • Medium · Outdated Dependency: notify — Cargo.toml - dependencies: notify = "4.0.15". The 'notify' crate is pinned to version 4.0.15, which is significantly outdated. Newer versions may contain security fixes and improvements. Consider updating to the latest stable version. Fix: Update 'notify' to the latest version by running 'cargo update notify' and test thoroughly to ensure compatibility.
  • Medium · Outdated Dependency: toml — Cargo.toml - dependencies: toml = "0.4.10". The 'toml' crate is pinned to version 0.4.10, which is an older release. Newer versions may have addressed security vulnerabilities and bugs. The crate is used for parsing configuration files, making it important to keep current. Fix: Update 'toml' to version 0.5.x or 0.6.x+ by running 'cargo update toml' and verify that TOML parsing behavior remains consistent.
  • Low · Outdated Dependency: regex — Cargo.toml - dependencies: regex = "1.5.5". The 'regex' crate is pinned to version 1.5.5. While not critical, newer versions may contain performance improvements and security patches. Current version is from 2021. Fix: Consider updating 'regex' to the latest 1.x version to benefit from performance improvements and bug fixes.
  • Low · Outdated Dependency: serde — Cargo.toml - dependencies: serde = "1.0.10". The 'serde' crate is pinned to version 1.0.10, which is quite old. Newer versions may contain security improvements and performance enhancements. Fix: Update 'serde' to the latest 1.0.x version to ensure you have the latest security patches and features.
  • Low · Outdated Dev Dependencies — Cargo.toml - dev-dependencies section. Development dependencies (assert_cmd, predicates, glob) are pinned to older versions. While they don't affect production, keeping them updated helps with development security and compatibility. Fix: Review and update dev-dependencies to latest versions using 'cargo update --dev'.

LLM-derived; treat as a starting point, not a security audit.


Generated by RepoPilot. Verdict based on maintenance signals — see the live page for receipts. Re-run on a new commit to refresh.

Mixed signals · sunface/rust-course — RepoPilot