Live data from Hacker News

Ask HN: Would you be interested in a Python to WebAssembly compiler?

news.ycombinator.com

1–8 of 8 posts

Ask HN: Would you be interested in a Python to WebAssembly compiler?

#1
Hi HN!

I'm Syrus, from Wasmer (server-side WebAssembly runtime [1]). We are in the midst of prioritizing our next quarter and I thought it could be interesting to ask here if you would be interested in a Python to Wasm compiler.

We already have a prototype working, but need a bit more time to perfection it.

Here are some use cases of a Python-to-Wasm compiler: 1. Usage of python libraries in the browser easily 2. Creating universal binaries that work anywhere

How would you use a Python to Wasm compiler? I'm eager to hear your thoughts. Thanks!!

[1]: https://wasmer.io/

Re: Ask HN: Would you be interested in a Python to WebAssembly compiler?

#3
I have used: https://github.com/iodide-project/pyodide

on my project https://epiphany.pub/post?refId=2684bc94f9fcb9ffe637ebfbeba2...

the experience is kinda poor, it's very very slow. At first I thought the reason was the packages are too huge, it took a very long time to download them. But it turned out that the slowness comes from the python runtime when loading a package.

I guess directly compile python into wasm will make code execution faster, but I'm interested in building a scripting environment.

Re: Ask HN: Would you be interested in a Python to WebAssembly compiler?

#4
I'd use it for something. I wanted to use pyiodide but the learning curve and the browser fiddling did me in. If it was fast, could be embedded in nodejs and deno it would fill a void. Granted, a big part of pythons draw is the std library, which is also part of why I don't think pyiodide is ideal.

Re: Ask HN: Would you be interested in a Python to WebAssembly compiler?

#6

I have used: https://github.com/iodide-project/pyodide on my project https://epiphany.pub/post?refId=2684bc94f9fcb9ffe637ebfbeba2... the experience is kinda poor, it's very very slow. At first I thought the reason was the packages are too huge, it took a very long time to download them. But it turned out that the slowness comes from the python runtime when loading a package. I guess directly compile python into wasm…

Yeah, Pyodide is great, although a bit slow.

I think the targets are a bit diferent: Pyodide is just a notebook for executing Python code and what I wanted is to transform Python code to Wasm (this implies some speedup as well).

Re: Ask HN: Would you be interested in a Python to WebAssembly compiler?

#7

I'd use it for something. I wanted to use pyiodide but the learning curve and the browser fiddling did me in. If it was fast, could be embedded in nodejs and deno it would fill a void. Granted, a big part of pythons draw is the std library, which is also part of why I don't think pyiodide is ideal.

Great feedback, thanks!!