sbinet / go-python

naive go bindings to the CPython2 C-API
Other
1.52k stars 138 forks source link

Question: Usable with WebAssembly (WASM)? #111

Closed Carnageous closed 3 years ago

Carnageous commented 3 years ago

Hey!

First of all, I think this project is really great! I did not look that deep into the code but it just works, wich I think is perfect. Anyway, my question would be if there is any way this would run when compiled to WASM? While Go supports WASM, I guess because of the heavy usage of C or C-APIs, it is unlikely that this runs with WASM, right? If it does not, do you think there are ways to add WASM support? I'd be happy to contribute in that manner.

Would appreciate an answer, thanks again!

sbinet commented 3 years ago

Yeah, no, as this project uses the c-api of cpython, it won't be compiled properly to wasm.

Another possible option is to use GitHub.com/go-python/gpython which is a pure Go implementation of (parts of) the python VM.

Or use starlark?