Calling node.js APIs from C++

402 views
Skip to first unread message

Peter

unread,
Jul 26, 2014, 5:49:47 AM7/26/14
to nod...@googlegroups.com
Hello, 

i have a C++ program(wrapper) built with the V8 engine. It is loaded as a library from another platform(also written in C++) and exposes the methods of that platform, so its methods can be called from JavaScript. I want also to use the APIs of node.js, like console.log. So i want to use the V8 instance, that my program already uses instead to start another one with node.js.
Is this possible with adding a few libraries from node.js to my program and which of them i need?

Thanks

Ingwie Phoenix

unread,
Jul 27, 2014, 9:28:45 PM7/27/14
to nod...@googlegroups.com
You should be able to obtain v8::Function’s using the global v8::Isolate* node_isolate. There also seem to be wrappers in the src/ folder (like node_tty_wrapper.h) that might be helpful too.

--
Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 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 unsubscribe from this group and stop receiving emails from it, send an email to nodejs+un...@googlegroups.com.
To post to this group, send email to nod...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/d9c0c9f8-edc1-4361-819c-70e1f2d3509a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages