webassembly-examples icon indicating copy to clipboard operation
webassembly-examples copied to clipboard

From Simple To Complex. A complete collection of webassembly examples.

webassembly-examples

From Simple To Complex. A complete collection of webassembly examples.

Usage

For 1 - 8:

# start
node ./#-path-to-example/index.js

# rebuild
cd #-path-to-example && wast2js script-name.wat -o script-name.js

For 9+ see readme.

Ordered list of examples
  • simple function
  • variables
  • conditions
  • memory
  • loop
  • block, br, br_if and labels
  • call_indirect
  • shared library
  • simple native function
  • emscripten
  • emscripten (synchronous initialization)
  • webassembly (npm module)
  • data structures
  • browser
  • webpack & emscripten
  • hello, rust
  • webpack (v3) + rust
  • webpack#next + rust

License

MIT, 2017+ Dmitriy Tsvettsikh