Explained that here: http://forum.micropython.org/viewtopic. ... =791#p4592, module creation and function registration goes like https://github.com/stinos/micropython/b ... in.cpp#L33.pfalcon wrote: Other approach is just to provide some manual, but simplified API for wrapping function - most realistically, "simplification" would require C++ usage, as e.g. Boost.Python does.
Note for CPython there's now also https://github.com/wjakob/pybind11 which has similar syntax and might be more attractive than Boost.Python, mainly because it does not use boost. I quickly looked into it but adapting it to work with uPy would almost come down to complete rewrite from scratch.