[Python SDK] Support for python SDK
Hello all,
As per my understanding, the wasmedge-bindgen makes it necessary to have an import object with functions return_result, return_error and then manually allocate memory according to data type by calling allocate then run the function that was written by the user and finally deallocate the allocated memory by calling deallocate.
If this is correct, then for the python SDK should I write a new module named wasmedge-bindgen in C++ doing what the host/go/bindgen.go does?
Or do you have any other recommendations?
Thanks!
CC @juntao
My understanding is that you want to do it in two steps:
1 Create a C or C++ library for wasmedge-bindgen under the host/c or host/cpp folder.
2 Create a Python package wrapper for the C/C++ library under the host/python folder.
Is that correct? My question is #2 -- why can't we just create a wasmedge-bindgen in pure Python (like we did for golang)? The extra dependency on the C library seems to be unnecessary? Thanks.
My understanding is that you want to do it in two steps:
1 Create a C or C++ library for
wasmedge-bindgenunder thehost/corhost/cppfolder.2 Create a Python package wrapper for the C/C++ library under the
host/pythonfolder.Is that correct? My question is #2 -- why can't we just create a
wasmedge-bindgenin pure Python (like we did for golang)? The extra dependency on the C library seems to be unnecessary? Thanks.
#1 Yes, it was that. But your #2 suggestion makes sense. I'll write it in python SDK just like go bindgen is written in go SDK. Thanks
Sounds good. Thanks. Look forward to your contribution!