This py wasm runtime is not sound. Many .whl modules include binarys, obviously it will not runable. This narrow the usage.
Extending web applications with WebAssembly and Python
21–27 of 27 posts
Re: Extending web applications with WebAssembly and Python
#22Earlier quoted context omitted.
Sounds great, I will put it in my new operating system running in the browser https://extendedmachine.com .
Not sure if you’re just trying to advertise your project, but I wouldn’t use Pyodide in that case. I’d personally rather use the tool linked in the OP article for something like an OS in the browser
Re: Extending web applications with WebAssembly and Python
#23This is exactly what I needed. Context is I am trying to incorporate different scripting language in our rust app so I tried RustPython and QuickJS. Its been a pain so far and it adds a lot of time to our compilation so I love the idea of being able to load a wasm python but I was missing this script to host communication part.
Re: Extending web applications with WebAssembly and Python
#24It's fun to see the lengths people go to avoid writing javascript
Re: Extending web applications with WebAssembly and Python
#25Earlier quoted context omitted.
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
Re: Extending web applications with WebAssembly and Python
#26Earlier quoted context omitted.
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.
Re: Extending web applications with WebAssembly and Python
#27Earlier quoted context omitted.
> 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