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
112 stars 4 forks source link

Export user function #10

Open g-rodigy opened 2 months ago

g-rodigy commented 2 months ago

Compiled python code not present in wasm export. Is this how it should be or can the behavior be changed? For example simple code like.

def mysum(a, b):
    return a + b

In result wasm file this function name will be like $impl___main__$$$function__1_mysum and will not exported.

wasm code function definition

(func $impl___main__$$$function__1_mysum (;8524;) (param $var0 i32) (param $var1 i32) (param $var2 i32) (result i32)
...