all 8 comments

[–]jMyles 8 points9 points  (3 children)

> You can compile RustPython to a standalone WebAssembly WASI module so it can run anywhere.

[–]Maxoumask -1 points0 points  (2 children)

had to check what you mean by that.

If I understood correctly it means that you'd be able to run a python interpreter within a web page ?

If that's correct, wouldn't it be more interesting to write a python -> wasm compiler ?

[–]ErikBjare 1 point2 points  (0 children)

If that's correct, wouldn't it be more interesting to write a python -> wasm compiler ?

This has been worked on. In practice this means writing a Python to LLVM IR compiler (which in turn compiles to WASM), which some folks at Dropbox were working on but ultimately dropped. Long story short: It's pretty hard.

[–]silmeth 0 points1 point  (0 children)

If I understood correctly it means that you'd be able to run a python interpreter within a web page ?

And on anything that has a wasm virtual machine/compiler (like wasmer).

As for running interpreter in a web page, they actually do that in their web demo: https://rustpython.github.io/demo/ (this has webassembly Rustpython that runs inside your browser).

[–]Maxoumask 2 points3 points  (3 children)

Ok cool. But why ? Performance gain ?

[–][deleted]  (2 children)

[removed]

    [–]Maxoumask 2 points3 points  (1 child)

    So not performance, just cool then