Pypy in the browser?

Does anyone know of any attempts to run pypy in a browser?

I ask because pypy can point to llvm, and there are currently two ways to run llvm in a browser: pnacl and emscripten.

+4
source share
2 answers

No AFAIK attempts. But PyPy in the browser will be great. We could compile PyPy C ++ code in JavaScript using Emscripten and implement JIT in JS in PyPy (which translates to JS, but more importantly emits JS). This can be very fast in fact, as the hot code will eventually be JITed in JS, which is then JITed JS VM.

I have repeatedly raised this idea on the news of hackers, program.reddit, etc., hoping to interest PyPy dev for working together on it. So far, no luck, but I hope it can happen one day.

+2
source

Given that PNaCl bit code is based on LLVM , it seems that the problem is only to force RPython to create the correct bits, but it seems like LLVM does not allow changing the bit code at runtime, so PyPy JIT will not work.

0
source

Source: https://habr.com/ru/post/1440865/


All Articles