Open pramukta opened 8 years ago
We don't really have anything for Python or Node. What @davidchappelle mentioned would only apply for other language bindings, where we've got a bit of experience with djinni.
I think the discussion here is mainly meant to decide on the architecture / directory layout for bindings so that they all fit together well enough. I guess a straightforward layout like https://github.com/arvidn/libtorrent/tree/master/bindings would be appropriate here as well, although I don't know if we would also want to adopt the actual bindings generator.
Given our current reliance on boost and its integration with C++ code, I could see Boost::Python work out well enough. SWIG is more complicated but can support more languages. Not sure what's best. @davidchappelle, opinions?
I was hoping to stick with djinni since we already have experience with it in other projects. Looks like https://github.com/dropbox/dijinni has experimental support for python. I would expect that other language binding generators would eventually be added to that project. I have never used SWIG myself but I have a lot of people curse it and the general consensus was it is complicated.
Not sure what the solution would be for NodeJS. Does SWIG even support a binding for that? I would prefer a binding generation solution that was simple and has good community support. I guess the first task here is to define some base requirements for language support and then find a bindings generator that best suits those requirements. Might have to think forward a bit in terms of what other languages may need to be supported.
Oh, I didn't realize that djinni added experimental Python support. That might be a decent choice.
SWIG does not appear to support node integration but it's really pretty straightforward. I would think that unless we get it for free by djinni or some other tool, it's better to just implement node support directly.
Also https://github.com/cmake-js/cmake-js for CMake (rather than gyp) based node native module build support.
Looks like SWiG supports javascript as of v3.0.1 http://www.swig.org/compat.html for whatever that is worth. Definitely attractive to have one solution for a variety of languages whether that is via SWIG or djinni or something else. I have heard the same thing about people cursing SWIG, no sure if that sentiment refers to the latest versions though.
I think it would be really cool to use bonefish as a library in Python, NodeJS or potentially other languages. I looked into it a little and some of the options (for python anyway) seem to be SWIG, Boost::Python, Cython, or a C interface called with cffi. In the discussion for #31, @davidchappelle mentioned that there may already be a nice framework for developing these, so just moving the conversation here.