Hey, all! We're already writing JS bindings for the CSDK to be used with node.js, and we have higher level binding that mimic the C++ API as well. Writing JS bindings is not as simple as producing them using SWIG. You need to know for which environment you wish to write bindings. Bindings for Chromium are completely different than bindings for Node.js, for example.
As far as the node.js bindings are concerned, it might be beneficial to integrate them with iotivity itself, because the contents of the bindings is determined by the build flags used to build iotivity. For example, certain constants are not defined if remote access is not enabled, and they are defined otherwise. Right now, I have to parse the header files using a bash script, which is super-undesirable because it doesn't recognize which C preprocessor directives were used during the compilation of iotivity itself. In addition, the interface between node.js and the bindings to native libraries changes all the time - so much so, that a second project called "native abstractions for node" (NAN) has sprung up to provide C preprocessor macros and C++ classes that allow developers to address multiple versions of node.js using the same C++ code. https://github.com/otcshare/iotivity-node Cheers! Gabriel -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20151001/02cd619a/attachment.html>
