There are several projects out there now that aim to provide this. k7 - http://github.com/sebastien/k7/tree/master v8-juice - http://code.google.com/p/v8-juice/ cproxyv8 - http://code.google.com/p/cproxyv8/ v8cgi - http://code.google.com/p/v8cgi/ v8r - http://code.google.com/p/v8r/
And dozens of others listed on (code.google.com). Take your pick. On Mon, May 4, 2009 at 3:20 PM, <[email protected]> wrote: > > Hi Everyone, > I have a question, not exactly about V8, but about "generic... > exposing C++ / ..." classes to Javascript. > I need to be able to use existing C++ API from JavaScript. What is the > ways to do that? > All I've seen before use sort of array of variants (any kind of > normalized arguments). So my question is: is there any way to map any > (means ANY C++) class to JavaScript? For example I have a library > which provides me with the interface to communicate with OSX Carbon > framework, and of course I wanna be able to do some stuff using V8 > JavaScript Engine. Normal way is to implement a "bridge" library which > will convert something like: > void showWindow(a, b, c) from native framework to void showWindow(array > [] Arguments) which will be used by V8. Does anyone has an experience > to do anything else? I've been trying to implement generic callback > which will perform method calls using ASM (put arguments into stack, > call subroutine). > The problem is, I don't wanna create specific implementation only for > using it with V8, I wanna reuse code... > Any suggestions? > > > --~--~---------~--~----~------------~-------~--~----~ v8-users mailing list [email protected] http://groups.google.com/group/v8-users -~----------~----~----~----~------~----~------~--~---
