8 ms·
Yes, you can compile PyPy to JavaScript. There even used to be a JS backend as part of the RPython translation toolchain, but it got dumped since no-one was int
by tav 15y ago
Yes, you can compile PyPy to JavaScript. There even used to be a JS backend as part of the RPython translation toolchain, but it got dumped since no-one was interested in working on it [1]. There've been more successful attempts like RPythonic [2] in translating from RPython to JavaScript by going via Emscripten [3], i.e.
RPython -> LLVM -> Emscripten -> JavaScript
And, then, there have been efforts like my own which have focused on building a WebKit bridge [4] to PyPy.
[1] http://www.mail-archive.com/pypy-dev@codespeak.net/msg03946.html http://www.mail-archive.com/pypy-dev@codespeak.net/msg03946....
[2] http://pyppet.blogspot.com/2011/04/rpython-to-javascript.html http://pyppet.blogspot.com/2011/04/rpython-to-javascript.htm...
[3] https://github.com/kripken/emscripten https://github.com/kripken/emscripten
[4] https://github.com/tav/naaga/tree/master/webkit_bridge https://github.com/tav/naaga/tree/master/webkit_bridge