Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Is there any way to compile a subset of Python itself to Wasm? (As opposed to compiling its interpreter to Wasm.) Same question for Javascript.


WASM is a virtual machine, but it's missing support for some things that would make that practical. GC support, polymorphic inline cache, char/byte types, reference types, etc. Some of that is on the WASM roadmap.


Thanks. I'd read that GC support might be on the way (and that that might make Go a bit more attractive for Wasm than it is currently). But I don't know anything about the other features you mention. Is it your understanding, or guess, that it is the "community's intention" to have (a subset of) JS or Python compiling to Wasm soonish and if so any guess as to how long?


CPython uses reference counting plus cycle-breaking, though, so it's not like you'd have to bundle a full GC implementation with your Python code.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: