* Fix instructions for building rust modules in python examples When I ran `rustc +nightly ...` the compiler just looked for a source file called `+nightly`. I changed these instructions to use rustup + rustc instead. * Initial documentation for python users Added documentation for using the Wasmtime loader in python, and explained the first two examples in the repo. Changed the import example to demonstrate working with module linear memory. * Fix include in python guide * Wording * Clarify memory usage * Flow through the example better * More word choice * Make rustup a prereq * Fix source code paths in python guide * Fix rustup example in python guide Co-Authored-By: Samrat Man Singh <samratmansingh@gmail.com> * Replace command examples with preformat blocks * Revert "Fix instructions for building rust modules in python examples" This reverts commit 1738888a2df4e15aba1e26c8ef42058e7a2053bb. * Left a block quote in a preformat example Co-authored-by: Samrat Man Singh <samratmansingh@gmail.com>
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.