Does anyone know of any attempts to get pypy running in the browser?
I ask because pypy can target llvm, and there are currently two ways to run llvm in the browser: pnacl and emscripten.
Does anyone know of any attempts to get pypy running in the browser?
I ask because pypy can target llvm, and there are currently two ways to run llvm in the browser: pnacl and emscripten.
No attempts AFAIK. But PyPy in the browser would be great. We could compile the PyPy C++ code into JavaScript using Emscripten, and implement a JIT into JS in PyPy (which gets translated into JS, but more importantly emits JS). That could be very fast actually, since hot code would end up being JITed into JS which is then JITed by the JS VM.
I raised this idea on hacker news, programming.reddit, etc. several times, hoping to interest a PyPy dev to collaborate on it. So far no luck but hopefully that can happen some day.
Considering that PNaCl bitcode is LLVM based is seems that the problem is just to get RPython produce correct bits, but it seems like LLVM doesn't allow to modify bitcode at run-time, so the PyPy JIT won't work.