DEV Community

Discussion on: Explain the State of WebAssembly to Me

Collapse
 
josiebigler profile image
Josie Bigler

This is on my todo list this weekend. Using WABT (github.com/WebAssembly/wabt) create a WebAssembly Binary for my Conway's Game of Life calculation, and see how much faster it can be in WASM vs plain Js.

More or less my plan is to create a WAT file (a textual representation of a WASM binary) use the WABT's wat2wasm tool to create the module, and then call that module in my current Game of Life implementation.

There are other ways to compile to WASM, but using WABT seemed the most friendly initially, because I don't know much about C, C++, or Rust.

Collapse
 
dilakv profile image
dilakv

Could you share your conclusions with us?

Collapse
 
josiebigler profile image
Josie Bigler

I was unable to effectively call web assembly to make my Conways Game of life faster. I got to the point where i could create a WASM binary and could call the binary in JS, but learning WAT to create the modules was a lot, especially to do anything meaningful.

I then looked into using other tools to compile WASM binaries, namely AssemblyScript. I had trouble creating the binaries because there is (or was) a bug preventing it from working on my version of windows. I never got around to setting everything up on my Linux machine to continue exploring WASM, because life got in the way.

I know there are some blog posts around that have recreated Conways Game of life in WASM. Still havent seen what the performance improvement would be.