mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
Add document for wasi
This commit is contained in:
1 parent
996250d959
commit
39e3f8faff
1 file changed
+11
@@ -74,6 +74,17 @@ this isn't officially supported and may be out of date:
|
||||
|
||||
You can compile RustPython to a standalone WebAssembly WASI module so it can run anywhere.
|
||||
|
||||
Build
|
||||
```shell
|
||||
$ cargo build --target wasm32-wasi --no-default-features --features freeze-stdlib,stdlib --release
|
||||
```
|
||||
|
||||
Run by wasmer
|
||||
```shell
|
||||
$ wasmer run --dir . target/wasm32-wasi/release/rustpython.wasm extra_tests/snippets/stdlib_random.py
|
||||
```
|
||||
|
||||
Run by wapm
|
||||
```shell
|
||||
$ wapm install rustpython
|
||||
$ wapm run rustpython
|
||||
|
||||
Reference in new issue
Block a user