FFI integration inside q

Hi dev team!

Back in the days when i was working as a professional kdb developer, I was always hitting the same thing when I needed to integrate 3rd party products with kdb: loading and integrating dynamic libraries into q. I always has to write C shim code just to pass data between q and the APIs of said product.

Now, the ffi interface for "libffi" has done a lot to simplify things but I was thinking that it will be much nicer if it is integrated inside q's "2:" functionality as static or dynamic linking if the library is present in the system. Of course, some semantics should be adjusted to match the existing "2:" implementation, but i think it is doable for both function binding, calling and global variable get and set.

The license for libffi is very permissive for inclusion into free or proprietary projects without poisoning the code that is using it like GPLv3.

Regards,

felix