DOOM Fire wasm
June 3, 2020 ยท View on GitHub
This example uses webassembly to run the DOOM Fire example in the browser. The example is mostly based on the rustwasm Conway's Game of Life tutorial.
Most of the files are just boilerplate. The important files are:
src/lib.rsthe rust code. A small wrapper around thedoomfirelibrarywww/index.jsthe javascript code that uses the canvas api to render the DOOM Firewww/index.htmlthe html page
How to build and run
$ rustup target add wasm32-unknown-unknown
- Compile rust to webassembly
$ cd examples/doomfire-wasm
$ wasm-pack build
- Install
npmdependencies
$ cd www
$ npm install
- Run the development server
$ npm run start
- Access http://localhost:8080/ in your browser