Comment

Comment by ThePhysicist

I'm trying to use asm.js to port Python to JS as a shared library, which would allow us to load and run arbitrary CPython modules (compiled for JS) in the browser. I generate code using emscripten, which is also able to generate WASM (which I'm not using at the moment though).

My experience so far:

Emscripten is quite mature and compiles even very complex C/C++ code without complaining. Statically linking code works fine, while dynamically loading shared libraries is still a bit problematic it seems.

Here's the Github project btw, help is very welcome:

https://github.com/adewes/cpython-emscripten

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton