140 points · by cleverjake · 13y ago · 12 comments
PNaCl has its own set of new APIs, none of which are supported by anything but PNaCl (and in particular not Emscripten); Emscripten does support the typical libraries a cross-platform app uses, like SDL, glut, egl, xlib. So it would be a lot of work to get Emscripten to do anything with PNaCl binaries given the different APIs.
Furthermore, converting PNaCl binaries to JS in the browser would add a lot of overhead compared to compiling to JS ahead of time and just sending the user the JS to directly run.
So if you want to run a C++ app in JS, you should just compile it to JS directly using Emscripten, PNaCl doesn't fit there in any way that I can see.
See also: jslinux (http://bellard.org/jslinux/)
Obviously, a JavaScript C compiler would have been a much more impressive demo, and that would have been demoed instead.