Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Python SDK] Support for python SDK #1

Open
SAtacker opened this issue Feb 2, 2022 · 3 comments
Open

[Python SDK] Support for python SDK #1

SAtacker opened this issue Feb 2, 2022 · 3 comments

Comments

@SAtacker
Copy link

SAtacker commented Feb 2, 2022

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!

Untitled Diagram drawio

CC @juntao

@juntao
Copy link
Member

juntao commented Feb 3, 2022

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.

@SAtacker
Copy link
Author

SAtacker commented Feb 3, 2022

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.

#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

@juntao
Copy link
Member

juntao commented Feb 3, 2022

Sounds good. Thanks. Look forward to your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants