mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-05-09 05:06:17 +00:00

Update python language binding setup.py and document Make compile.sh executable: `chmod +x compile.sh`
32 lines
542 B
Markdown
32 lines
542 B
Markdown
# WARM API
|
|
|
|
* **Notice**: The python package `wamr.wamrapi.wamr` need python >= `3.9`.
|
|
|
|
## Setup
|
|
|
|
### Pre-requisites
|
|
|
|
Install requirements,
|
|
|
|
```
|
|
pip install -r requirements.txt
|
|
```
|
|
|
|
### Build native lib and update bindings
|
|
|
|
The following command builds the iwasm library and generates the Python bindings,
|
|
|
|
```sh
|
|
bash language-bindings/python/utils/create_lib.sh
|
|
```
|
|
|
|
This will build and copy libiwasm into the package.
|
|
|
|
## Examples
|
|
|
|
There is a [simple example](./samples/main.py) to show how to use bindings.
|
|
|
|
```
|
|
python samples/main.py
|
|
```
|