Hacker News new | past | comments | ask | show | jobs | submit login

How is it misleading? It is the whole point that you can compile CPython or PHP interpreters to target this as another target platform like x86 or ARM



Python performance on wasm is going to be abysmal because you're essentially running a VM inside a VM. Other languages like rust can compile directly to wasm. Until Python can do the same it will be a second or third class citizen in wasm.

Put another way, you could make one of those tier charts for WASM tooling, and if rust is in S tier, python is like C or D tier.


You are not running a VM inside a VM. You are compiling to another target and modern Wasm runtimes allow AOT and JIT so performance is close to native while preserving all the other goodness of Wasm (sandbox, portability to 'weird' environments like browsers and IoT, etc)


Rust is not an interpreted language like Python. Your comment would make sense if Python code could be compiled into x86 or ARM assembly in the first place.


> Your comment would make sense if Python code could be compiled into x86 or ARM assembly in the first place.

It can actually be compiled (or transpiled) into C code [1] with few limitations, so I can't see why not. It still requires libpython but it should be better than porting the whole interpreter to webassembly.

[1] https://github.com/Nuitka/Nuitka


By that logic, you can transpile your Python to C and then compile to Wasm


Yes, that was my point. AFAIK it is not possible with current tooling, though.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

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

Search: