A no-nonsense guide to webpack, Electron & WebAssembly — Part 1
I wanted an all-in-one Hello World, so I wrote one
I recently attended Covalence, the first conference dedicated to Electron. The talks inspired me to write some code (an activity a rarely get to do these days.) I’m excited about WebAssembly so this gave me a good excuse to have a play.
I don’t know about you but I learn how to combine software by starting with the different quickstarts, tweaking them and iteratively combining them. To my surprise, I couldn’t find a guide on Electron, webpack and WebAssembly. So as I started trolling GitHub I thought, “maybe someone else is interested in this. I should blog it!”
So here’s my game plan for the different parts:
- webpack tl;dr
- Electron tl;dr
- C++ to WebAssembly with Emscripten
- Bringing it all together
Let’s get started!
Create a project folder that looks like this:
and download the source from here:
With everything on your machine, run
npm install to install the dependencies,
npm start to launch a server and
npm run build to get builds you can serve from a webserver.
We’ll come back to webpack in a future post but for now we’re done. In the next post we’ll look at Electron.