Skip to content

Repository files navigation

wgpu_learning

CI

A self-checking course that grows a modern GPU renderer in Rust/wgpu one render-graph node per chapter — think nand2tetris meets a miniature UE5 renderer. Windowing, device setup, and frame pacing are a pre-built "chassis"; the learner writes Nodes and plugs them into a Graph, and every chapter starts running and ends running. wgpu is pinned to 29.0.4 workspace-wide (see Cargo.toml for the pin rationale).

Quickstart

cargo run -p ch01_triangle   # the classic RGB triangle, in seconds
cargo test -p ch01_triangle  # same frame rendered headlessly, checked
                             # against a golden image

Layout

  • chassis/ — windowing, surface, frame loop, WGSL hot-reload (given, never rebuilt)
  • graph/ — the mini render-graph executor
  • ch01_triangle/ — chapter 1; one crate per chapter, each runnable + testable
  • docs/ — mdbook tutorial; code is pulled from compiled files by include anchor
  • COURSE.md — the course menu: all 13 chapters + appendices with status
  • AGENTS.md — the eight binding design principles

Verified by CI

Every push and pull request runs GitHub Actions (.github/workflows/ci.yml) on macos-latest — chosen because the golden-image tests render on a real GPU and Metal matches the machine the goldens were generated on. The workflow builds the whole workspace, runs all headless golden-image tests, and gates on clippy (-D warnings) and cargo fmt --check. A second job builds the mdbook tutorial and fails on any broken include anchor, so tutorial prose can never drift from code that compiles and renders. If the book says a chapter draws a triangle, CI has already watched it draw one.

About

Learning modern rendering by building a mini UE5-style engine in Rust/wgpu — a self-checking chapter course

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages