| Crates.io | cars2 |
| lib.rs | cars2 |
| version | 0.1.0 |
| created_at | 2025-08-01 01:17:16.033297+00 |
| updated_at | 2025-08-01 01:17:16.033297+00 |
| description | The second cellular autoamata experiment on crates.io |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1775932 |
| size | 51,207 |
cars is a CLI + TUI tool for simulating custom, rule-based cellular automata. It supports multiple presets, custom rule input, and real-time visualizations using Ratatui.
B/S notation (e.g., B3/S23)glider, blinker, blockcargo build --release
cargo run
cargo run -- --preset glider --width 40 --height 20 --ui tui
cargo run -- --preset glider --rule B36/S23 --ui tui
--steps)cargo run -- --preset blinker --width 30 --height 30 --ui tui
| Flag | Description | Default |
|---|---|---|
--rule |
Cellular automaton rule string in B/S format |
B3/S23 |
--width |
Grid width | 10 |
--height |
Grid height | 10 |
--steps |
Number of generations to simulate (omit to run until Ctrl+C) | (infinite) |
--preset |
Pattern to seed initially (glider, blinker, block) |
(optional) |
--ui |
UI mode: tui for interactive, omit for plain terminal output |
(optional) |
Uses standard Life-like cellular automaton notation:
B = birth conditionsS = survival conditionsExample:
B3/S23 (Conway’s Game of Life):
MIT