ServerJS/C API
From MozillaWiki
< ServerJS
C API
For C/C++ based JavaScript interpreters, being able to interface easily with C libraries is a big win because of all of the available functionality. Each JavaScript interpreter has its own bridge to C, but if there is some common API (possibly exposed at the JavaScript level as in ctypes), then this will make it much easier to share work between interpreters.
Prior Art
- The JSAPI is the C API for the SpiderMonkey JavaScript engine https://developer.mozilla.org/En/SpiderMonkey/JSAPI_
- NSPR API Reference https://developer.mozilla.org/en/NSPR_API_Reference
- Ejscript http://www.ejscript.org/products/ejs/doc/api/native.html is a complete native API to create objects, classes and composite native types. It also supports loadable modules with backing native libraries.
- jsffi http://code.google.com/p/jslibs/wiki/jsffi is a module that allow you to call any symbol in a native module (dll/so).
- jsext "Including C functions" http://jsext.sourceforge.net/Including%20C%20functions.html
- js-ctypes https://wiki.mozilla.org/JSctypes is a foreign-function library for Mozilla’s privileged JavaScript. It provides C-compatible data types and allows JS code to call functions in shared libraries (dll, so, dylib) and implement callback functions.
- SpiderApe plugins http://spiderape.sourceforge.net/plugins/
- NSPR API Reference https://developer.mozilla.org/en/NSPR_API_Reference
- K7 http://github.com/sebastien/k7 Uses a system of C preprocessor macros to product cross-interpreter native modules.
- Flusspferd's C++ api http://docs.flusspferd.org/ provides a nicer (and slightly abstracted) C++ API to Spidermonkey