This source code was the demo for the talk titled, "Web Assembly: Is it really next generation"?
Listed below are the links to the talk materials.
To successfully setup this project, ensure you have installed the following:
- NodeJS
- Rust Compiler
- wasm-pack CLI (this requirs the Rust Compiler mentioned above).
With your termimal:
cd
into the rust directory, and run the following commands:
wasm-pack build
cd
into the javascript directory, and run the following commands:
npm install
npm run start
This should serve your app on localhost:8080
or the port might be different if an existing app is making use of the current port.
- Open the URL on your browser & enjoy 🚀.
The source is broken into 2 sections. The javascript and the rust directory.
The rust is responsible for parsing the stringified JSON, and gets compiled
to .wasm
using wasm-pack.
Once the .wasm
file has been generated, it is pre-registered as a package in the
javascript
app.
The Javascript app will always see the wasm module as an npm package, and allow our javascript
app to execute it.
Do you feel something isn't right or you have an cool feature in mind, kindly open an issue or create a pull request.
I'll be glad to review it and possibly merge it.
MIT © Tochukwu Nkemdilim