Skip to content

Omega-Mu-Gamma-Studio/Rust-Chan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

13 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿฆ€ Rust-chan

An anime-guided Rust tutor for people who want the compiler to yell at them until they're right. She doesn't comfort you. She corrects you. That's the respect. React Vite Zustand Framer Motion MIT License Live Demo

Built by Omega Mu Gamma Studio ยท the team behind SeeDS, KMapX, EG Suite, GateLab, Java-chan, and PlusPlus-chan.


What is Rust-chan?

Rust-chan is a browser-based Rust learning app where an intense, principled mascot character teaches you systems programming the way the borrow checker would, if the borrow checker had a face. She does not soften bad news. If your code doesn't compile, she tells you exactly why, and exactly what rule you broke โ€” because in her view, that's the only kind of teaching that actually works.

The curriculum is built around CLI tools โ€” every concept earns its place by being useful in something you'd actually ship from a terminal. Ownership isn't abstract; it's why your file-processing tool doesn't leak memory. Lifetimes aren't scary; they're why your string parser doesn't hand back garbage. By the end of all 75 lessons, you've built and packaged a real async CLI tool, ready for crates.io.

No hand-holding. No participation trophies. Just Rust, taught with discipline.

๐Ÿ”— Try it live โ†’ rust-chan.vercel.app


The Teaching Model

Every single lesson โ€” all 75 of them โ€” follows this exact structure:

Phase Name What Happens
1 See It Work Rust-chan shows working code, the output, and explains what's happening line by line
2 See It Break Same code, deliberately broken โ€” she explains the compiler error, what caused it, and why the compiler is right
3 You Try Student writes code or fills in blanks; pattern-based validation gives immediate feedback

Validation is regex/pattern-based โ€” no code execution in the browser. For full programs, students compile and run in their own environment.


Curriculum โ€” 75 Lessons Across 5 Units

All five units are complete, published, and available from day one.

Unit Topic Lessons
1 Rust Basics 15
2 Ownership and Borrowing 15
3 Types, Traits, and Patterns 15
4 Collections, Closures, and Concurrency 15
5 Async Rust and Final Project 15
๐Ÿ“– View all 75 lessons

Unit 1 โ€” Rust Basics 1.1 Why Rust Exists โ€” Safety Without GC ยท 1.2 Setting Up Rust and Cargo ยท 1.3 Your First Rust Program ยท 1.4 How the Compiler Talks to You ยท 1.5 Variables and Mutability ยท 1.6 Scalar Types ยท 1.7 Compound Types โ€” Tuples and Arrays ยท 1.8 Functions ยท 1.9 Control Flow โ€” if, loop, while, for ยท 1.10 String vs &str ยท 1.11 Comments and Documentation ยท 1.12 Cargo โ€” Build, Run, Test ยท 1.13 Crates and the Ecosystem ยท 1.14 Common Beginner Compiler Errors ยท 1.15 Mini Challenge โ€” CLI Calculator

Unit 2 โ€” Ownership and Borrowing 2.1 What is Ownership? ยท 2.2 Move Semantics ยท 2.3 Clone and Copy ยท 2.4 References and Borrowing ยท 2.5 The Borrow Checker ยท 2.6 Mutable References ยท 2.7 Dangling References ยท 2.8 Slices ยท 2.9 String Slices ยท 2.10 Ownership in Functions ยท 2.11 Ownership in Structs ยท 2.12 The Stack vs The Heap ยท 2.13 Lifetime Annotations ยท 2.14 Lifetime Elision ยท 2.15 Mini Challenge โ€” String Processor

Unit 3 โ€” Types, Traits, and Patterns 3.1 Defining Structs ยท 3.2 Methods and impl Blocks ยท 3.3 Tuple Structs ยท 3.4 Enums ยท 3.5 The Option Type ยท 3.6 The Result Type ยท 3.7 match Expressions ยท 3.8 if let and while let ยท 3.9 Defining Traits ยท 3.10 Implementing Traits ยท 3.11 Default Implementations ยท 3.12 Trait Bounds ยท 3.13 Generics ยท 3.14 Common Standard Traits ยท 3.15 Mini Challenge โ€” Shape Calculator

Unit 4 โ€” Collections, Closures, and Concurrency 4.1 Vectors ยท 4.2 HashMaps ยท 4.3 Iterators ยท 4.4 Iterator Adaptors โ€” map, filter, collect ยท 4.5 Chaining Iterators ยท 4.6 Closures ยท 4.7 Capturing the Environment ยท 4.8 Fn, FnMut, FnOnce ยท 4.9 Threads in Rust ยท 4.10 Message Passing with Channels ยท 4.11 Shared State with Mutex ยท 4.12 Arc and Send/Sync ยท 4.13 The ? Operator ยท 4.14 Custom Error Types ยท 4.15 Mini Challenge โ€” Multi-Threaded Word Counter

Unit 5 โ€” Async Rust and Final Project 5.1 What is Async? ยท 5.2 async/await Syntax ยท 5.3 Tokio Runtime ยท 5.4 Async File I/O ยท 5.5 Async Network I/O ยท 5.6 Building an Async HTTP Client ยท 5.7 Parsing CLI Arguments ยท 5.8 Reading and Writing Files in a Real App ยท 5.9 Error Handling in Production Code ยท 5.10 Writing Tests in Rust ยท 5.11 Benchmarks ยท 5.12 Publishing to Crates.io ยท 5.13 Project โ€” Scope Your CLI Tool ยท 5.14 Project โ€” Implement and Test ยท 5.15 Project โ€” Package and Ship


Features

๐ŸŽ“ Learning System

  • Three-phase lesson structure โ€” See It Work โ†’ See It Break โ†’ You Try, on every lesson, no exceptions
  • CLI-tool context throughout โ€” every code example builds toward a real, shippable command-line tool
  • Contextual hint escalation โ€” hint appears at 2 wrong attempts, solution unlocks at 5 (she makes you earn it)
  • Pattern-based validation โ€” instant feedback without a server or code execution engine
  • Full lesson navigation โ€” collapsible sidebar with per-lesson completion tracking

๐ŸŽฎ Progression & Rewards

  • XP system โ€” earn XP on lesson completion; bonus XP for first-attempt success and hint-free runs
  • 10 levels โ€” clear thresholds (100 XP per level) with a persistent progress bar
  • Level-gated cosmetics โ€” new rewards unlock as you level up, alternating themes and outfits
  • localStorage persistence โ€” no account needed, progress is saved in the browser

๐ŸŽจ The Shop

App Themes (equippable backgrounds):

Level Item Style
1 Forge & Rust ๐Ÿ”ฅ Burnt orange and iron โ€” heat-treated metal, the default
3 Compiler's Bunker โš™๏ธ Concrete and copper pipe, the room where the borrow checker lives
5 Blueprint Black ๐Ÿ“ Technical drafting paper, white ink, zero tolerance for ambiguity
7 Molten Core ๐ŸŒ‹ Deep red-orange, the heat of a build that finally passed cargo test
9 Midnight Refinery ๐Ÿญ Cold blue-black industrial skyline, the night shift

Character Outfits (equippable; all with full 6-expression sprite art):

Level Outfit Vibe
1 Blacksmith's Apron ๐Ÿ”จ Leather and soot. Her signature look, always equipped
2 Foundry Coveralls ๐Ÿฆพ Systems Mode โ€” ON. Steel-toed and unimpressed
4 Field Engineer's Jacket ๐Ÿงฐ Tool belt loaded. The borrow checker travels with her
5 Off-Duty Flannel ๐Ÿชต The build finally compiled. She allows herself a coffee
6 Iron Knight's Plate โš”๏ธ Memory safety isn't a suggestion, it's armor
7 Crimson Architect ๐Ÿ—๏ธ Concurrency Mode โ€” ON. She designed this thread pool herself
7 Idol โ€” Zero-Cost Abstraction โœจ She already performs a Celebration. Might as well dress for it
8 Async Operative ๐Ÿ•ถ๏ธ Cold logic. Non-blocking. Every await is intentional
8 Master Smith ๐Ÿ”ฅ๐Ÿ‘˜ She forged the language. Or close enough
10 Crate Maintainer's Crown ๐Ÿ‘‘ You shipped to crates.io. Wear the crown
10 Off the Clock ๐Ÿ–๏ธ cargo test passed. So has she earned a beach day. Don't push it

Downloadable Wallpapers (phone/desktop art, save to your device):

Level Wallpaper Vibe
3 Compile Time, No Warnings ๐ŸŒ† The longest wait ends with zero errors and zero excuses
3 Iron Foundry Sunrise ๐ŸŒ… Sparks rising off the forge, dawn breaking through the smoke
5 The Borrow Checker's Throne ๐Ÿฐ She rules here. Every reference answers to her
5 Mountain Summit โ€” No Segfaults ๐Ÿ”๏ธ She made it to the top without a single unsafe block
5 Steel Library ๐Ÿ“š Cold light, technical manuals, the Rust Book dog-eared to chapter 10
7 Rainy Foundry Window ๐ŸŒง๏ธ Even in the rain, the forge stays lit
7 Rooftop Watchpoint ๐ŸŒƒ City skyline, the sign reads // no unsafe here
7 Neon Refinery ๐Ÿ•น๏ธ Hot orange, cold blue, one cabinet running an async benchmark
9 Shrine Steps โ€” Memory Safe ๐Ÿฎ Stone steps, dawn mist, no dangling references in sight
9 Forge at Dusk ๐ŸŒ† Even the longest debug sessions end with the fire dying down

โœจ Character & Expressions

Rust-chan has 6 distinct expressions that fire contextually throughout lessons:

State Trigger
idle Phase 1 โ€” explaining working code
thinking Hint mode; waiting for input
surprised Correct answer
happy Phase transitions and encouragement
sad Wrong answer (first few times)
idle-sleep Idle between interactions

Each equipped outfit has its own full set of 6 expression sprites โ€” swapping outfits changes Rust-chan's entire look, not just a filter.

Domain Expansion โ€” a fullscreen celebration effect fires on milestone level-ups, complete with confetti (and, unusually for her, a smile).


Tech Stack

Layer Choice Why
Frontend React 19 + Vite 8 Fast HMR, ES modules, modern JSX transform
Styling Plain CSS + Framer Motion 12 No CSS framework overhead; animations via Motion
State Zustand 5 Minimal boilerplate, works with persist middleware out of the box
Data JSON files + localStorage Zero backend for Phase 1; data adapter ready for Phase 2
Routing React Router v7 File-level page components
Hosting Vercel Zero-config deployment

Getting Started

Prerequisites

  • Node.js 18+
  • npm or yarn

Running Locally

# Clone the repo
git clone https://github.com/Omega-Mu-Gamma-Studio/Rust-Chan.git
cd Rust-Chan

# Install dependencies
npm install

# Start the dev server
npm run dev

The app runs at http://localhost:5173 by default.

# Build for production
npm run build

# Preview the production build locally
npm run preview

Deploying to Vercel

This repo is Vercel-ready with no configuration needed. Connect the repo in the Vercel dashboard and it'll detect the Vite setup automatically. No environment variables required for Phase 1.


Project Structure

Rust-Chan/
โ”œโ”€โ”€ public/
โ”‚   โ”œโ”€โ”€ sprites/                      # Character expressions (Blacksmith's Apron โ€” base outfit)
โ”‚   โ”‚   โ”œโ”€โ”€ teaching.png
โ”‚   โ”‚   โ”œโ”€โ”€ excited.png
โ”‚   โ”‚   โ”œโ”€โ”€ frustrated.png
โ”‚   โ”‚   โ”œโ”€โ”€ thinking.png
โ”‚   โ”‚   โ”œโ”€โ”€ oops.png
โ”‚   โ”‚   โ”œโ”€โ”€ idle.png
โ”‚   โ”‚   โ””โ”€โ”€ uniforms/                 # Outfit-specific sprite sets (6 expressions each)
โ”‚   โ”‚       โ”œโ”€โ”€ foundry-coveralls/
โ”‚   โ”‚       โ”œโ”€โ”€ field-jacket/
โ”‚   โ”‚       โ”œโ”€โ”€ flannel/
โ”‚   โ”‚       โ”œโ”€โ”€ iron-plate/
โ”‚   โ”‚       โ”œโ”€โ”€ crimson-architect/
โ”‚   โ”‚       โ”œโ”€โ”€ idol/
โ”‚   โ”‚       โ”œโ”€โ”€ async-operative/
โ”‚   โ”‚       โ”œโ”€โ”€ master-smith/
โ”‚   โ”‚       โ”œโ”€โ”€ maintainer-crown/
โ”‚   โ”‚       โ””โ”€โ”€ off-the-clock/
โ”‚   โ””โ”€โ”€ wallpapers/                   # Downloadable device wallpapers (10 total)
โ”‚       โ”œโ”€โ”€ rustchan-compile-clean.png
โ”‚       โ”œโ”€โ”€ rustchan-foundry-sunrise.png
โ”‚       โ”œโ”€โ”€ rustchan-borrow-throne.png
โ”‚       โ”œโ”€โ”€ rustchan-no-segfault-summit.png
โ”‚       โ”œโ”€โ”€ rustchan-steel-library.png
โ”‚       โ”œโ”€โ”€ rustchan-rainy-foundry.png
โ”‚       โ”œโ”€โ”€ rustchan-rooftop-watchpoint.png
โ”‚       โ”œโ”€โ”€ rustchan-neon-refinery.png
โ”‚       โ”œโ”€โ”€ rustchan-shrine-memsafe.png
โ”‚       โ””โ”€โ”€ rustchan-forge-dusk.png
โ”‚
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ components/
โ”‚   โ”‚   โ”œโ”€โ”€ character/RustChan.jsx      # Sprite renderer; reads spriteOverrides from equipped outfit
โ”‚   โ”‚   โ”œโ”€โ”€ layout/AppLayout.jsx        # Root layout; applies theme + background
โ”‚   โ”‚   โ”œโ”€โ”€ lesson/                     # LessonCanvas, CodeBlock, PhaseIndicator
โ”‚   โ”‚   โ””โ”€โ”€ ui/                         # Sidebar, BottomBar, XPDisplay, ProgressBar
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ data/
โ”‚   โ”‚   โ”œโ”€โ”€ lessons/                  # 75 JSON lesson files (unit1โ€“5, lessons 1โ€“15)
โ”‚   โ”‚   โ”œโ”€โ”€ units/                    # 5 unit JSON files (id, title, lesson list)
โ”‚   โ”‚   โ””โ”€โ”€ shopItems.js              # All cosmetic definitions (outfits, themes, downloadables)
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ hooks/
โ”‚   โ”‚   โ”œโ”€โ”€ useLesson.js              # Lesson phase state machine
โ”‚   โ”‚   โ”œโ”€โ”€ useProgress.js            # Progress store bindings
โ”‚   โ”‚   โ””โ”€โ”€ useSound.js               # Sound effect hooks
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ pages/
โ”‚   โ”‚   โ”œโ”€โ”€ Home.jsx                  # Dashboard / unit selection
โ”‚   โ”‚   โ”œโ”€โ”€ UnitPage.jsx              # Lesson list for a unit
โ”‚   โ”‚   โ”œโ”€โ”€ LessonPage.jsx            # The actual lesson experience
โ”‚   โ”‚   โ””โ”€โ”€ Shop.jsx                  # Cosmetics shop
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ services/
โ”‚   โ”‚   โ”œโ”€โ”€ lessonService.js          # JSON loader + lesson data access
โ”‚   โ”‚   โ””โ”€โ”€ storageService.js         # localStorage adapter (Phase 2: swap for API)
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ store/
โ”‚   โ”‚   โ”œโ”€โ”€ progressStore.js          # Zustand store: XP, level, outfits, progress
โ”‚   โ”‚   โ””โ”€โ”€ lessonStore.js            # Zustand store: active lesson state
โ”‚   โ”‚
โ”‚   โ””โ”€โ”€ utils/
โ”‚       โ”œโ”€โ”€ xpCalculator.js           # XP thresholds, level math, earned XP calculation
โ”‚       โ”œโ”€โ”€ patternMatcher.js         # Regex-based answer validation engine
โ”‚       โ””โ”€โ”€ rustHighlighter.js        # Rust syntax highlighting for code blocks

Adding Content

Adding a New Lesson

Lesson JSON files live at src/data/lessons/unit{N}/{N}.{M}.json. Each file follows this structure:

{
  "id": "1.1",
  "title": "Why Rust Exists",
  "xp": 10,
  "phases": [
    {
      "phase": 1,
      "title": "See It Work",
      "dialogue": "Rust-chan's explanation text here",
      "code": "fn main() {\n    println!(\"Hello, Player!\");\n}",
      "output": "Hello, Player!"
    },
    {
      "phase": 2,
      "title": "See It Break",
      "dialogue": "Here's what happens when...",
      "code": "fn main() {\n    println!(\"Hello, Player!\")\n}",
      "error": "error: expected `;`, found `}`"
    },
    {
      "phase": 3,
      "title": "You Try",
      "dialogue": "Your turn. Don't make me explain `cargo run` again.",
      "prompt": "What macro prints to standard output in Rust, with a newline?",
      "answer": "println!()",
      "hint": "It ends with a bang.",
      "solution": "println!()"
    }
  ]
}

Adding a New Outfit

  1. Create a folder under public/sprites/uniforms/<outfit-name>/
  2. Drop in 6 PNGs named: teaching.png, idle.png, oops.png, thinking.png, frustrated.png, excited.png
  3. Add an entry to src/data/shopItems.js with spriteOverrides mapping each expression state to the correct file path
  4. That's it โ€” RustChan.jsx and Shop.jsx both read spriteOverrides automatically

Developer Cheat Mode

In the Shop page, triple-click the Shop title to toggle the dev cheat:

  • First triple-click โ†’ instantly sets XP to 9999 and level to 10 (unlocks everything)
  • Second triple-click โ†’ resets XP and level back to 0 / 1

Roadmap

Phase 1 (Current) โœ…

  • All 75 lessons authored and published
  • Full cosmetics system (11 outfits, 5 themes, 10 downloadable wallpapers)
  • XP/leveling, shop, expressions, domain expansion
  • localStorage persistence, no account required

Phase 2 (Planned)

  • PostgreSQL + Express API backend
  • User accounts and cross-device sync
  • Progress stored server-side (the store already has a _resetForMigration hook and storage adapter pattern ready for this)
  • Instructor view: class-wide completion dashboards
  • No frontend rewrite required โ€” only the storage layer changes

Credits & Assets

Character Art: Rust-chan's sprites were generated using AI tools and hand-curated for expression consistency by the Omega Mu Gamma Studio team. All character designs are proprietary to Omega Mu Gamma Studio.

Note: As a free, open-source educational tool, we prioritized shipping a complete learning experience over commissioning custom art. If you're an artist interested in contributing official character designs, reach out โ€” we'd love to collaborate.


Part of Omega Mu Gamma Studio

Rust-chan is part of a student-built suite of open-source engineering and CS education tools from Omega Mu Gamma Studio.

Tool What it does
SeeDS 3D data structure visualizer with drag-and-drop Playground mode
KMapX Karnaugh map simplifier with don't-care support
EG Suite 3D Engineering Graphics simulator for ME22201
GateLab 2D digital logic schematic playground (CS22303)
Java-chan Anime-guided Java tutor for CS22301
PlusPlus-chan Anime-guided C++ tutor for aspiring game developers
Rust-chan Anime-guided Rust tutor for systems programming and CLI tools โ€” this repo

License

The source code for this project is released under the MIT License.

The character art, sprites, and visual assets for Rust-chan are proprietary. They are not covered by the MIT License and may not be reproduced, redistributed, or used outside this project without explicit permission from Omega Mu Gamma Studio.

ยฉ 2026 Omega Mu Gamma Studio

Releases

No releases published

Packages

 
 
 

Contributors