wasm-micro-runtime/language-bindings/python/wamr-api
2025-07-02 15:26:18 +08:00
..
samples wamr-python: Enable debugging WASM and grant dir access (#2449) 2023-08-15 10:32:43 +08:00
README.md Revert "Merge and solve conflict for extended const (#4435)" (#4445) 2025-07-02 15:26:18 +08:00
requirements.txt Add WAMR API bindings in Python (#1959) 2023-02-16 15:21:28 +08:00

WAMR API

  • Notice: The python package wamr.wamrapi.wamr requires a python version >= 3.10.

Setup

Pre-requisites

Install requirements

Before proceeding it is necessary to make sure your Python environment is correctly configured. To do ths open a terminal session in this directory and perfom the following:

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Build native lib and update bindings

The following command builds the iwasm library and generates the Python bindings,

# In WAMR root directory
bash language-bindings/python/utils/create_lib.sh

This will build and copy libiwasm into the package.

Samples

  • basic: Demonstrating how to use basic python bindings.
  • native-symbol: Desmostrate how to call WASM from Python and how to export Python functions into WASM.