Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jimj92120/game-of-life

A Conway's Game of Life using Rust and WebAssembly
https://github.com/jimj92120/game-of-life

canvas rust typescript wasm webassembly webgl

Last synced: about 2 months ago
JSON representation

A Conway's Game of Life using Rust and WebAssembly

Awesome Lists containing this project

README

        

# game-of-life

A **Conway's Game of Life** demo using WebAssembly with `Rust` and `TypeScript` and rendering with `WebGL 2`.

See [rules](https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life).

See [demo](https://jimj92120.github.io/game-of-life) in Github Pages.

---
---
## Requirements
| | |
|--------------|-----------|
| `npm` | `^6.0` |
| `Node.js` | `^14.0` |
| `TypeScript` | `^4.0` |
| `Rust` | `^1.63.0` |
| `Cargo` | `^1.63.0` |
| `wasm-pack` | `^0.10.3` |

Also requires a browser compatible with `WebGL 2`.

## Project's structure

```sh
/(root)
/src # app entrypoint (Typescript / JavaScript)
/lib # lib entrypoint (Rust)
/static # static assets (e.g index.html)
```

## How to install

```sh
npm install
```

## How to run in debug mode

```sh
# Builds the project and opens it in a new browser tab. Auto-reloads when the project changes.
npm start
```

## How to build in release mode

```sh
# Builds the project and places it into the `dist` folder.
npm run build
```

## How to run unit tests

```sh
# Runs tests in Firefox
npm test -- --firefox

# Runs tests in Chrome
npm test -- --chrome

# Runs tests in Safari
npm test -- --safari
```