Stream: general

Topic: Compile Python to wasm and run it with wasmtime


view this post on Zulip Owen Ou (Sep 28 2021 at 20:41):

Has anyone successfully compiled Python to wasm with wasi and run it with wasmtime? I have been playing with https://pyodide.org but it doesn't run on wasmtime yet (there is an open issue: https://github.com/pyodide/pyodide/issues/558). If so, do you have any pointers? Thanks in advance!

Is it possible to run pyodide in runtimes like WAVM or Wasmer? I've tried to ti start pyodide.asm.wasm doesn't work. Is there a special version of pyodide?

view this post on Zulip Alex Crichton (Sep 29 2021 at 18:45):

IIRC RustPython has a WASI port and I think may work, although I'm not sure if it's a production-quality interpreter

A Python Interpreter written in Rust. Contribute to RustPython/RustPython development by creating an account on GitHub.

view this post on Zulip Owen Ou (Oct 05 2021 at 18:32):

Alex Crichton said:

IIRC RustPython has a WASI port and I think may work, although I'm not sure if it's a production-quality interpreter

Thanks, @Alex Crichton. I tried that and ran into some issue compiling to wasi: https://github.com/RustPython/RustPython/issues/3159

Clone the project and build with the wasi target: cargo build --target wasm32-wasi Compiling libz-sys v1.1.3 Compiling wasm-bindgen-backend v0.2.75 Compiling serde v1.0.127 Compiling thiserror v1.0...

Last updated: Oct 23 2024 at 20:03 UTC