Files
wasmtime/crates/misc/py
Alex Crichton d9edb95218 Allow using WASI APIs in the Python extension (#533)
* Allow using WASI APIs in the Python extension

This commit adds support to the Python extension to load the WASI
implementation when a WASI module is seen allowing Python to load
WebAssembly modules that use WASI. This is pretty primitive right now
because there's no way to configure the environment/args/preopens/etc,
but it's hoped to be at least a start!

* rustfmt

* Refactor checks for the wasi module name

* Move the check into `wasmtime-wasi` itself
* Make it conservative for now and match anything that says `wasi*`
* Leave a `FIXME` for improving this later on

* Enable missing feature of winapi for `winx`
2019-11-11 11:09:45 -08:00
..
2019-11-08 06:35:40 -08:00
2019-11-08 06:35:40 -08:00
2019-11-08 06:35:40 -08:00
2019-11-08 06:35:40 -08:00
2019-11-08 06:35:40 -08:00

Python 3 extension for interface with Wasmtime/Cranelift.

Build

First, you'll need to install some Python dependencies:

$ pip3 install setuptools wheel==0.31.1 setuptools-rust

Next you can build the extension with:

rustup run nightly python3 setup.py build

Note that a nightly version of Rust is required due to our usage of PyO3.

This will create a directory called build/lib which you can add to PYTHONPATH in order to get import wasmtime working.