| Crates.io | conway_game_of_rust |
| lib.rs | conway_game_of_rust |
| version | 0.1.0 |
| created_at | 2026-01-05 19:18:42.037772+00 |
| updated_at | 2026-01-05 19:18:42.037772+00 |
| description | A TUI implementation of Conway's Game of Life in Rust. |
| homepage | |
| repository | https://github.com/Shonhh/Conways-Game-of-Rust |
| max_upload_size | |
| id | 2024409 |
| size | 50,165 |
A (soon-to-be) high-performance, terminal-based implementation of Conway's Game of Life, built with Rust and Ratatui.
Conway's Game of Rust is a TUI (Terminal User Interface) application that brings the popular classic cellular automata game "Conway's Game of Life" to the terminal! It features a modal interface inspired by Vim (Normal, Visual, and Insert/Running modes), allowing for pattern editing and simulation control.
Built for Linux/Unix systems with primary support for NixOS via Flakes.
h, j, k, l movement.If you have the Rust toolchain installed, you can build directly from crates.io (once published) or from source:
# From source
git clone https://github.com/Shonhh/Conways-Game-of-Rust.git
cd Conways-Game-of-Rust
cargo install --path .
This project features a hermetic development environment and build process using Nix Flakes.
Run directly without installing:
nix run github:Shonhh/Conways-Game-of-Rust
Build the binary:
nix build
# Binary is available at ./result/bin/conway_game_of_rust
Enter the development shell:
nix develop
Run the application from your terminal:
conway_game_of_rust
| Key | Action | Context |
|---|---|---|
| Movement | ||
h / ← |
Move Cursor Left | Normal / Visual |
j / ↓ |
Move Cursor Down | Normal / Visual |
k / ↑ |
Move Cursor Up | Normal / Visual |
l / → |
Move Cursor Right | Normal / Visual |
| Control | ||
Enter |
Play / Pause Simulation | All Modes |
Space |
Toggle Cell State | Normal Mode |
Space |
Toggle Selection | Visual Mode |
v |
Enter Visual Mode | Normal Mode |
Esc |
Return to Normal Mode | Visual Mode |
r |
Reset / Clear Grid | Normal / Visual |
q |
Quit Application | All Modes |
The current version (v0.1.0) focuses on a stable, idiomatic implementation of the core Game of Life rules using a fixed-size vector grid. Future updates will focus on scalability and rendering optimizations.
Camera Controls:
Zooming: Implement sub-cell rendering (using Unicode block characters like ▀ and █) to display 2x or 4x more cells per terminal character.
Panning: Decouple the viewport from the grid memory, allowing the user to scroll across an infinite or massive plane.
Performance Optimizations:
Currently, the engine uses a dense 2D vector, which limits performance on extremely large grids.
Goal: Refactor to a sparse matrix or HashLife algorithm to support millions of active cells with minimal memory overhead.
Larger/Infinite Grid:
Transition from fixed 128x80 bounds to a dynamically resizing vector or chunk-based system to support larger patterns like "glider guns" and "logic gates."
Templates/RLE code implementation:
Add cool templates that showcase cool aspects of Conway's Game of Life.
Allow for users to utilize RLE codes that exist in previous implementations of this game, letting users copy and publish creations.
Step-by-Step Control:
Fine-grained control over the simulation speed and state, like stepping or slowing down simulation speed.
This project is licensed under the MIT License. See the LICENSE file for details.