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

Before adding the new bindings: 1. Moved wasm-c-api in a subfolder wasmcapi in the package. 2. Adapted the tests to be able to run in this new structure. New: 1. Added the WAMR API in another folder wamrapi in the same level as wasm-c-api. 2. Created an OOP proposal. 3. Added an example using this proposal.
26 lines
465 B
Markdown
26 lines
465 B
Markdown
# WARM API
|
|
|
|
## Examples
|
|
|
|
Copy in `language-bindings/python/wamr/libs` the library `libiwasm` generated from `product-mini/platforms`.
|
|
|
|
There is a [simple example](./samples/main.py) to show how to use bindings.
|
|
|
|
```
|
|
python samples/main.py
|
|
```
|
|
|
|
## Update WAMR API bindings
|
|
|
|
Install requirements,
|
|
|
|
```
|
|
pip install -r requirements.txt
|
|
```
|
|
|
|
Run the following command,
|
|
|
|
```sh
|
|
ctypesgen ../../../../core/iwasm/include/wasm_export.h -l ../libs/libiwasm.so -o iwasm.py
|
|
```
|