Files tree
Preparatory work
Files creation
Wasm generation
Generate wasm module in build folder from rs file:
Reduce the size by removing unused stuff from the module:
You can download wasm module here. Save as main.wasm in build folder.
Result
a + b = c
WebAssembly text format
Other
Http server
For local testing http server with CORS needed. A good "ready-to-use tool" option could be browser-sync: To use it:
You don't need http server if you are using Firefox.