Node can easily consume C libraries through V8 Bindings written in C++ or through the ffi module as Bradley said. The only catch is those C libraries need to never block on I/O. If they do, they will kill the node server's performance since node is single-threaded. Any existing library that does I/O will probably need some work to integrate properly. Either it uses blocking I/O or it has it's own event loop. Best are libraries that separate I/O and logic (or abstract out the I/O) so that a node bindings can use the part they want using node's I/O.
On Fri, Mar 22, 2013 at 2:39 PM, Gaurav Meena <[email protected]>wrote: > In c++ addon I have looked at github, full code is written with v8/node > headers... > > I am not sure if a library purely written in c can be added to addon.... > > I see most of the users criticizing node.js for lack of db libs if it can > be done then all dbs can be connected through node.js . it will be a huge > plus point for node.js community. > > -- > -- > Job Board: http://jobs.nodejs.org/ > Posting guidelines: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > You received this message because you are subscribed to the Google > Groups "nodejs" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en > > --- > You received this message because you are subscribed to the Google Groups > "nodejs" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
