wasmerio / py2wasm

Nuitka is a Python compiler written in Python. It's fully compatible with Python 2.6, 2.7, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, and 3.11. You feed it your Python app, it does a lot of clever things, and spits out an executable or extension module.
http://nuitka.net
Apache License 2.0
68 stars 3 forks source link

Ability to import/export functions as WASM imports/exports #5

Open johnlanni opened 1 week ago

johnlanni commented 1 week ago

Can py2wasm directly export functions or other symbols directly as WASM exports? And what about imports?

johnlanni commented 1 week ago

We aim to utilize py2wasm for compiling Python into WASM plugins within the Envoy. However, a challenge lies in exposing Python functions as WASM exports, for instance: (the wasm was compiled by tinygo)

image

It is also necessary for the Python code to specify the functions exposed by Envoy, based on WASM Imports declarations, for instance:

image