Requirements:
Feature
Due to enhancement of wasi support of python libraries, we now also can do it!
How to
Build wasi binary:
cargo build --target wasm32-wasi --no-default-features --features freeze-stdlib,stdlib --release
You will need to install wasm32-wasi target using rustup.
Run test:
wasmer run --dir . target/wasm32-wasi/release/rustpython.wasm -- -m test test_support
You will need to install wasmtime or wasmer to run it.
Current result:
...
File "test.support", line 16, in <module>
File "unittest", line 66, in <module>
File "unittest.main", line 8, in <module>
File "unittest.runner", line 9, in <module>
File "unittest.signals", line 1, in <module>
File "signal", line 1, in <module>
ModuleNotFoundError: No module named '_signal'
It doesn't work. Because we don't have _signal module for wasi yet, while cpython does have.
To run cpython wasi build, I used this article as reference:
https://snarky.ca/testing-a-project-using-the-wasi-build-of-cpython-with-pytest/
Requirements:
Feature
Due to enhancement of wasi support of python libraries, we now also can do it!
How to
Build wasi binary:
You will need to install wasm32-wasi target using rustup.
Run test:
You will need to install wasmtime or wasmer to run it.
Current result:
It doesn't work. Because we don't have
_signalmodule for wasi yet, while cpython does have.To run cpython wasi build, I used this article as reference:
https://snarky.ca/testing-a-project-using-the-wasi-build-of-cpython-with-pytest/