On this page Play

A cozy pixel-art game · v1.0

Learn Rust from Ferris himself.

25 islands, 187 levels and the whole Rust Book. Your code is compiled by a real rustc, and Ferris the crab, powered by Claude, explains every error along the way.

Start playing
git clone https://github.com/wanikhawar/ferris-forge
cd ferris-forge
cargo run

Opens the game at 127.0.0.1:7878. Needs Rust; Ferris talks through Claude Code or gives built-in hints offline.

Click Ferris to make him dance.
Islands
25
Levels
187
Level types
5
Build step
0

01 · How Ferris helps

Stuck on a compiler error? Ferris walks you through it.

This is level 4.1 on Borrow Bridge. The goal is to make it print ferris has 6 letters, but rustc refuses. Step through what happens next.

🔧 Fix it · Just looking, thanks! main.rs
fn count_letters(word: String) -> usize {
    word.len()
}

fn main() {
    let word = String::from("ferris");
    let n = count_letters(word);
    println!("{} has {} letters", word, n);
}
Compiler · real rustc output
error[E0382]: borrow of moved value: `word`
 --> main.rs:8:35
  |
6 |     let word = String::from("ferris");
  |         ---- move occurs because `word` has type `String`,
  |              which does not implement the `Copy` trait
7 |     let n = count_letters(word);
  |                           ---- value moved here
8 |     println!("{} has {} letters", word, n);
  |                                   ^^^^ value borrowed here after move
  |
note: consider changing this parameter type in function
      `count_letters` to borrow instead if owning the value
      isn't necessary
 --> main.rs:1:24
  |
1 | fn count_letters(word: String) -> usize {
  |                        ^^^^^^ this parameter takes ownership
The compiler and the tests decide whether you pass. Ferris explains, hints and reviews, and he can only talk: he has no tools in the game.

02 · Try a level

🔮 Predict it: does this compile?

Three real levels from Ownership Caves and Borrow Bridge. Pick an answer and watch Ferris react.

Ownership Caves · Copy or move?

fn main() {
    let a = 5;
    let b = a;
    let s1 = String::from("hi");
    let s2 = s1;
    println!("{} {}", a, b);
    println!("{}", s2);
}
Answer: A

i32 is Copy, so a and b both hold 5. s1 was moved into s2, but s1 is never used again, so there's no error. Moving isn't a problem by itself; only using the old name afterwards is.

Ownership Caves · Scope

fn main() {
    let outer = String::from("outer");
    {
        let inner = String::from("inner");
        println!("{} {}", outer, inner);
    }
    println!("{} {}", outer, inner);
}
Answer: C

inner only exists inside the inner { }. At the } it is dropped and its name is gone, so the last line is error E0425. Rust catches this at compile time, so it can never become a use-after-free at runtime.

Borrow Bridge · The three keys: Read, Write, Own

fn main() {
    let mut v = vec![1, 2, 3];
    let first = &v[0];
    v.push(4);
    println!("{}", first);
}
Answer: B

first borrows from v, so v loses its Write permission until first's last use on line 5. v.push(4) needs Write, so it's error E0502. Pushing could reallocate the vector and leave first dangling, which is exactly the bug Rust prevents.

03 · A look around

A whole world, drawn in code.

04 · How it works

A real compiler, and a crab who can only talk.

⚙️ Real compiler
Your code runs through your own rustc. The compiler and tests decide whether you pass, not the AI.
🦀 Ferris = Claude
Explanations, hints, reviews and chat go through claude -p, so they use your Claude subscription. No API key.
🧠 Pick a brain
Switch Ferris between Fable, Opus, Sonnet and Haiku, and choose an effort level.
⚡ Energy bar
The “E” bar shows how much of your Claude usage limit is left. Offline mode uses built-in hints and costs nothing.
🔒 Local only
Listens on 127.0.0.1, and its API only answers the game's own page. Each run is limited in memory, CPU time and file size, and stopped after 5 seconds.
✅ Every level verified
cargo run -- verify checks that every starter fails, every solution passes, and every book topic is taught.
The five level types: Fix it, Fill it, Predict it, Quiz and Boss

05 · The islands

The whole Rust Book, in the order you need it.

The curriculum follows Brown University's interactive edition of The Rust Programming Language.

  1. Tutorial BeachWash ashore, meet Ferris, and say your first words in Rust.
  2. Variable Villagelet, mut, shadowing, number types, tuples and arrays.
  3. Flow Forestif, functions, loop, while and for.
  4. Ownership CavesRust's big idea: every value has exactly one owner.
  5. Borrow BridgeLend things out without giving them away.
  6. Struct SmithyForge your own types.
  7. Enum IslesA value that can be one of several things.
  8. Collection CitadelLists, text and dictionaries.
  9. Error MarshWhen things go wrong, and what to do about it.
  10. Guessing Game GrottoBuild the book's guessing game.
  11. Pattern PlainsEvery shape a pattern can take.
  12. Module MinesOrganize bigger programs into neat tunnels.
  13. Testing GroundsProve your code works, automatically.
  14. Trait TowerWrite code once, for many types.
  15. Lifetime LabyrinthHow long does a reference live?
  16. Iterator RapidsLittle functions and conveyor belts.
  17. Minigrep HarborBuild a real command-line search tool.
  18. Pointer PeaksBox, Rc, RefCell and friends.
  19. Object ObservatoryObjects, Rust style.
  20. Thread VolcanoDoing many things at once, safely.
  21. Async ArchipelagoWaiting for many things without wasting time.
  22. Cargo DocksShip your code to the world.
  23. Advanced AbyssThe deep end of Rust.
  24. Web Server CitadelThe final project: a multithreaded web server.
  25. Ferris' LibraryThe book's appendices as quick quizzes.

06 · Questions

Before you set sail

Do I need Claude to play?

No. Without Claude Code, switch Ferris to offline mode in Settings and he gives built-in hints. Every level is still compiled and checked the same way.

Can levels use crates like tokio?

Levels are compiled with plain rustc, so no. Async Archipelago comes with runtime.rs, a tiny async runtime built from the standard library that stands in for tokio.

Is it safe to run?

It runs the code you write as you, like cargo run would. The game only listens on 127.0.0.1, its API needs a per-install key, and on Linux each program runs in its own process namespace.

What does Vim mode use?

Your own Neovim, through nvim --embed, with your config by default. It never writes files; the game saves your code itself.

Which systems does it run on?

It's developed and tested on Linux.