https://github.com/hdescobarh/conways-rust-wasm
A Conway's Game of Life implementation in Rust WebAssembly
https://github.com/hdescobarh/conways-rust-wasm
cellular-automaton rust rust-wasm webassembly
Last synced: over 1 year ago
JSON representation
A Conway's Game of Life implementation in Rust WebAssembly
- Host: GitHub
- URL: https://github.com/hdescobarh/conways-rust-wasm
- Owner: hdescobarh
- License: mit
- Archived: true
- Created: 2023-01-24T00:53:05.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-24T01:19:11.000Z (over 3 years ago)
- Last Synced: 2025-02-03T11:22:06.688Z (over 1 year ago)
- Topics: cellular-automaton, rust, rust-wasm, webassembly
- Language: Rust
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# conways-wasm 🦀 🕸



## Description
A simple Conway's Game of Life [0] exercises intended to introduce myself to Rust WebAssembly. The simulation space is **toroidal** and implements a basic memoization strategy.
The excersice and initial project's setting was inspired by [1-3].
## Regarding Panic and file size
Setting "panic=abort" [4] does not remplace "process:abort" [5]. In consecuence, a panic that aborts still calls some functions (e.g., panic_fmt, set_hook) [6,7]; then, it will put code bload on the wasm.
## References
0. [Conway's Game of Life](https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life)
1. [wasm-bindgen-test's Guide](https://rustwasm.github.io/wasm-bindgen/wasm-bindgen-test/usage.html)
2. [wasm-pack-template] https://github.com/rustwasm/wasm-pack-template
3. [wasm_game_of_life](https://github.com/rustwasm/wasm_game_of_life)
4. [Build configuration: Abort on panic! (The Rust Performance Book)](https://nnethercote.github.io/perf-book/build-configuration.html#abort-on-panic)
5. [Shrinking .wasm Code Size: Avoid Panicking (Rust and WebAssembly)](https://rustwasm.github.io/docs/book/reference/code-size.html#avoid-panicking)
6. [Avoiding allocations in Rust to shrink Wasm modules](https://www.reddit.com/r/rust/comments/xxvwyy/avoiding_allocations_in_rust_to_shrink_wasm/)
7. [Function std::process::abort](https://doc.rust-lang.org/std/process/fn.abort.html)