* FFI Library Extension

Writing and using plugins for Version 5 and above.
Post Reply
User avatar
tatewise
Megastar
Posts: 22116
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

FFI Library Extension

Post by tatewise » 22 Jul 2021 11:11

While investigating the Problem with utf8 library (19608), the module https://github.com/Stepets/utf8.lua revealed that it can use the FFI Library Extension for calling external C functions and using C data structures from pure Lua code.

On initial reading, it seems that FFI may offer some power user benefits in functionality and especially runtime.
Is this FFI library something that anybody else might find useful and is it worth arranging for it to be available with FH?
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
ColeValleyGirl
Megastar
Posts: 3018
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: FFI Library Extension

Post by ColeValleyGirl » 22 Jul 2021 11:45

If it isn't a pure Lua library it will be a problem getting it packaged too work reliably in all environments. Plus
The ffi library is tightly integrated into LuaJIT (it's not available as a separate module). The code generated by the JIT-compiler for accesses to C data structures
So I think it's a non starter.

Post Reply