I'm not sure if there's a recent libffi binding; however, there is https://github.com/facebook/luaffifb which is (mostly) compatible wtih the LuaJIT FFI and runs on 5.1 through 5.3.