This project is based on the tutorial from the Rust🦀 and WebAssembly🕸 book, realizing Conway's Game of Life.
This project requires the standard Rust toolchain (rustup
, rustc
, and cargo
). If you do not have it or have an older version than
Rust 1.30, follow this link to install it now.
Furthermore, you will also need wasm-pack
and
npm
.
$ git clone https://github.com/tamglaeser/La-Vie.git
$ cd ./La-Vie
$ tree -L 3 .
.
├── Cargo.toml
├── LICENSE_APACHE
├── LICENSE_MIT
├── README.md
├── src
│ ├── lib.rs
│ └── utils.rs
├── tests
│ └── web.rs
└── www
├── bootstrap.js
├── index.html
├── index.js
├── package.json
├── README.md
└── webpack.config.js
Execute the following command to build the crate.
$ wasm-pack build
Next, run the following commands to install the Node.js dependencies and run the server.
$ cd ./www
$ npm install
$ npm run start
Assuming the client and server are on the same machine, navigate to http://localhost:8080/ on your Web browser and you should be able to see the evolution of life!