Back to browse
GitHub Repository

A playground for cellular automata

42 starsRust

Cellarium: A Playground for Cellular Automata

by andrewosh·Feb 21, 2026·41 points·1 comment

AI Analysis

●●SolidWizardryRabbit HoleEye Candy

Rust-to-WGSL compilation for cellular automata with live parameter tweaking and history replay.

Strengths
  • Proc macro transpiles subset of Rust to GPU shaders at compile time, eliminating boilerplate for CA developers.
  • Pan/zoom canvas with real-time TUI parameter adjustment lets you discover emergent behaviors interactively.
  • JSON timeline captures parameter deltas so you can perfectly replay and regenerate discoveries.
Weaknesses
  • Limited to 32 floats of state per cell due to texture channel packing, constraining complex behaviors.
  • No community examples beyond Game of Life, so learning curve unclear for domain newcomers.
Target Audience

Game developers, simulation enthusiasts, graphics programmers

Similar To

Golly · Shadertoy · Lenia

Post Description

Hey HN, just wanted to share a fun, vibe-coded Friday night experiment: a little playground for writing cellular automata in a subset of Rust, which is then compiled into WSGL.

Since it lets you dynamically change parameters while the simulation is running via a TUI, it's easy to discover weird behaviors without remembering how you got there. If you press "s", it will save the complete history to a JSON file (a timeline of the parameters that were changed at given ticks), so you can replay it and regenerate the discovery.

You can pan/zoom, and while the main simulation window is in focus, the arrow keys can be used to update parameters (which are shown in the TUI).

Claude deserves all the credit and criticism for any technical elements of this project (beyond rough guidelines). I've just always wanted something like this, and it's a lot of fun to play with. Who needs video games these days.

Similar Projects

Hardware●●Solid

SC-NeuroCore – Rust neuromorphic compiler, 512× speedup

They ship a Rust engine plus Python models that claim cycle-exact, bit-true equivalence with Verilog and a verified co-simulation suite — and back it with a 512× speedup and sub-10µs inference numbers. This is a rare, technically ambitious toolkit for building and proving neuromorphic FPGA/CPU stacks, though the AGPL license and narrow domain mean it’s primarily valuable to hardware teams and researchers, not casual ML users.

WizardryNiche Gem
anulum
204mo ago