Same Space Invaders–style game as the other folders, using the raylib crate. Part of the polyglot repo; see the root README for context, controls overview, and comparison notes.
- Rust — a toolchain that supports
edition = "2024"inCargo.toml(seerustc --version/ rustup ifcargoerrors on the edition). - Raylib — the
raylibcrate links against the native library. If the build fails with missingraylib/pkg-configerrors, install your platform’s Raylib development package so the linker can resolve it.
From the repository root:
cd rust-invaders
cargo runcd rust-invaders
cargo testsrc/main.rs— window setup, input, main loop.src/state.rs—GameState, modes, update logic.src/entities.rs— entity types.src/collision.rs— hit tests (includes unit tests).src/config.rs— dimensions and tuning constants.
Move with Left / Right, A / D, or H / L. Space counts as pressed or held for shooting. Enter restarts after game over or win. Zig-only differences: root README — Controls.