Python
You can use Wasmer in your Python projects to execute WebAssembly modules securely and conveniently.
In this section we will go through the instructions on how to setup your Python environment, to then visit different examples of how to use Wasmer in Python.
To be able to run Wasmer inside our Python application, we will need Python to be installed in our system. Both Python 2.7 and 3.x are compatible with Wasmer.
To ensure it is installed, let's run the following:
python --version # This will display the Python version
If this command work, Python is successfully installed!
Now it's time to create a new project and add Wasmer as a dependency:
mkdir wasmer-project
cd wasmer-project
pip install wasmer wasmer_compiler_cranelift
More compilers are also available:
Singlepass:pip install wasmer_compiler_singlepass
LLVM:pip install wasmer_compiler_llvm
Next, let's take a look at some examples!
Last modified 4mo ago