Using FFI as a plugin

  • From: Coda Highland <chighland@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Thu, 17 May 2012 11:44:10 -0500

My program is a plugin loaded into an external host, and I've
discovered that the FFI is unable to resolve symbols defined in it
because the host (for obvious reasons) doesn't load the plugin into
the global symbol namespace.

Is there a way around this while still using the FFI? Perhaps a way to
provide an explicit function pointer instead of relying on
dlsym/GetProcAddress? I'd like to avoid the overhead and performance
hit of wrapping all of my functions in Lua_CFunctions if at all
possible.

/s/ Adam

Other related posts: