I am currently working on a scripting language that FFI does not yet have. I would like to know what is the most convenient way to get it, assuming that I would like to write it like cool geeks - I would like to write FFI in a scripting language.
The programming language I need for the interface is C. Therefore, for the basics, I know that libdl.so is my best friend. Obviously, this is not the only thing I need, but the most important of them.
I have only a small idea of what I need for this. I would like to get similar behavior from FFI, like ctypes python.
What do I need to know to go this far? I know that there is serious magic with data structures that I will have to deal with. How do I manage this so that I can do most of this serious magic in the scripting language itself? I would use such magic much more than just an external function interface. For example, I could transfer C-like binary data to files.
source
share