Skip to content
Journey to Code

Series

Learn Rust / Build something real

Rustbound

Small function.
Bigger game.

A game is a collection of small systems working together. Build them in Rust, from your first damage function to a dependable game core.

  • Rust
  • Game systems
  • 16 published lessons
THE RUSTBOUND CORE
Every small rule turns something bigger.
main.rs / The first moving part
fn click_damage(base: u32, bonus: u32) -> u32 {
    base.saturating_add(bonus)
}

The mission log

Build on what you learned. Each lesson adds another working piece to the game.

  1. 01 / Make the rules work

    Skip Hello World.Learn Rust by building real game logic instead of stopping at Hello World. Write and test three small functions for damage, health, and enemy defeat. · 7 min read
  2. One Attack Is Not a Fight.Learn Rust by turning small functions into a combat loop. Build an attack() function, use mut and while, and create your first real game mechanic. · 7 min read
  3. 02 / Give the world a shape

    Three Numbers Are Not a Player.When your attack takes three loose u32 values, Rust has no idea which belong to the player. Learn how structs give your game data a name and a shape. · 6 min read
  4. Borrowing Without the Lecture.Learn Rust ownership and borrowing by fixing three real compiler errors. Let a player attack an enemy with &Player and &mut Enemy, without a lecture. · 9 min read
  5. One Fight Is Not a Game.Learn Rust impl blocks and methods by giving your idle game one Game struct, tougher enemies by stage, and a game.click() that runs a full turn. · 8 min read
  6. 03 / Make decisions matter

    Winning Is Not Progress.Learn Rust by making winning pay. Add gold, XP, and levels to an idle game, level up with a while loop, and calculate damage with a &self method. · 12 min read
  7. False Is Not an Answer.Our player has ninety-six gold and nothing to buy. Build a shop in Rust, then replace a vague true or false with an enum and let match handle every outcome. · 11 min read
  8. 04 / Build the engine

    Idle Is Not a Timer.Make your Rust idle game progress while you are away. Add tick(seconds), a for loop, and tests that run an hour of game time instantly. · 12 min read
  9. We Accidentally Built a Game Engine.Split a Rust game into modules and a library crate, step by step, with tests passing after every move. Learn mod, pub, and pub use. · 15 min read
  10. Closing the Terminal Is Not Game Over.Teach a Rust idle game to save itself as JSON and load itself back. Add your first dependency with serde, and let Result handle a save that will not load. · 19 min read
  11. 05 / Cross into the browser

    JavaScript Does Not Get the Rules.Compile a Rust idle-game engine to WebAssembly, give JavaScript a small adapter instead of the rules, and run the same tested game in a browser. · 17 min read
  12. A Button Is Not a Rule.Build one Web Component that draws the Rust engine, turns clicks into game.click(), keeps time, and saves progress in the browser. · 18 min read
  13. Localhost Is Not a Launch.Turn Rustbound Idle into a five-file release build, test the exact folder that ships, and deploy the WebAssembly game as a Render static site. · 7 min read
  14. A Bookmark Is Not an App.Turn Rustbound Idle into an installable Progressive Web App that opens without a network, saves when hidden, and proves its offline release in a real browser. · 9 min read
  15. Cheaters Are Going to Cheat.Validate edited Rust game saves, repair values the rules already know, reject impossible state, and admit what client-side code cannot prevent. · 6 min read
  16. 06 / Build what comes next

    The Tutorial Is Not the Game.Turn a finished Rust tutorial into a welcoming open-source project, then take one small contribution from idea to pull request. · 12 min read