It was the opportunity for me to continue my Rust learning journey, and I think I’m finally starting to feel a bit comfortable with the language, especially ownership :). I also wanted to discover what was possible when using Rust for frontend development, and I must say I was so impressed by Yew! I didn’t think it would be so nice to use, especially since I have quite some experience with React.
A big difference compared to the various implementations you can find (often in Rust and Yew tutorials) is that the grid is infinite. This means that you can drag it to move in all directions, but also zoom in and out. This was probably the most challenging part of my project and involved a lot of calculus and doodles in my notebook! Also, since I used a canvas to draw the grid (and not DOM elements), the simulation is pretty fast even when a lot of cells are displayed :D
What I learned during this project:
- Use Yew  for frontend development: not very different from writing React components, with the advantages of Rust as a plus!
- Serialize/deserialize data: the available Game of Life patterns are extracted from the official Lexicon ; I parsed the text version to generate a serialized version (separate library: ) that I then import and deserialize in the app.
- Build the web app using GitHub actions and deploy it using Netlify: pretty straightforward using Trunk  as a bundler (also used for development).
You can find the source code of the app on GitHub . Please tell me what you think of it! ;)
And my own fork of it, with extra features:
> the available Game of Life patterns are extracted from the official Lexicon
It would probably be a good idea to add the appropriate credit to the app itself, since the contents of the Life Lexicon are licensed under CC BY-SA.
A feature suggestion, if I may. It's fun to play with the rules of the game itself. Would you consider adding a way to tweak the birth/death rules? For example, "B3/S23" denotes the normal rules of the game (a cell is born if it has 3 live neighbors, and remains alive if it has 2 or 3).
You can play with the rules in my version of Life here.
The book "The Recursive Universe" by William Poundstone is a fun look into the Game of Life, pairing observations and thoughts about the game with real world physics and life.