Given that I have used ruby-ffi in the past, I decided to give emscripten a try this time around. The installation guides are spot on and work like a charm except one minor thing. For some reason, on running the emscripten (using ./emcc command) it complained about not finding python2. Not sure why it’s looking for python2 in the PATH, but I created a symlink to the installation of python in /usr/bin and called it python2 instead.
Hope this simple fix doesn’t cause any more issues later on.