THIS IS A HIGHLY UNFINISHED PROJECT AND IS PRONE TO BUGS. PROCEED WITH CAUTION IF YOU WANT TO USE THIS. EVERYTHING YOU SEE RIGHT NOW IS SUBJECT TO CHANGE AND IMPROVEMENT. PARDON OUR DUST.
I couldn't find a libffi wrapper for Duktape, so I decided to write one myself. This library allows you to call native binaries such as .DLLs or .SOs from JavaScript without having to any write glue code in C or C++.
Current features:
- Loading libraries from native binaries
- Passing the current pointer to the current Duktape context
- Defining native functions and calling them
- Equivalent to C/C++'s "sizeof" in JavaScript through looking up a table of types
Upcoming features:
- Definition of structs
- Casting one type to another
- A memcpy-like function used to copy blocks of memory to another
- Converting pointers to strings
- A malloc/free wrapper to create data buffers natively
- Bug fixes
This code is licensed under MIT and is free to use under those conditions.