4 ms·
Python running well in WASM requires WASM to be more like a virtual machine (as in JVM, not KVM) and less like ASM. WASM is headed that way, with things like G
by tyingq 3y ago
Python running well in WASM requires WASM to be more like a virtual machine (as in JVM, not KVM) and less like ASM. WASM is headed that way, with things like GC. But then you also need direct DOM integration. And even if you have both of those working well, Python's runtime and stdlib are pretty large, and if everyone picks a different version of Python they want to run, there's no economy of scale. Couple that with browsers all killing off the advantage of shared libraries in a CDN via cache partitions. It feels like the road to all of that working reasonably well in all situations is pretty long.
- rthz 3y agoIt's done currently in Pyodide: Python with DOM integration running with WASM. Minimal application with stdlib is around 5.5MB after compression now. Not small but still manageable depending on the use case. Still I agree with your other comments, and in particular not being able to share caches in the browser is very unfortunate (but understandable).
- tyingq 3y agoYes, it works...but it puts python at a big disadvantage in terms of size and performance. The DOM integration, for example, works, but isn't what it could be if WASM had more direct support for it.