lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hey

> On 18 Nov 2016, at 10:24, Simon Cozens <simon@simon-cozens.org> wrote:
> Yep, my NSLua (https://github.com/simoncozens/NSLua - heavily based on
> EasyLua) gives you a bidirectional bridge between Lua and ObjC.
> 
> What exactly are you looking for? Are you embedding Lua in an ObjC app,
> or something else?

Thanks for the swift reply!

I currently maintain Hammerspoon (http://www.hammerspoon.org/) which uses Lua to expose a whole raft of OS X APIs to users (window management being probably the most used part).

Right now I'm investigating how reasonable it would be to allow users to interact directly with ObjC objects from Lua (effectively allowing new OS API plugins to be written in pure Lua). What potentially makes this harder is that we already have a homegrown NSObject wrapper around Lua (https://github.com/Hammerspoon/hammerspoon/tree/master/LuaSkin), which provides some interfacing between the two, but not anything like FFI (mainly around converting data back and forth). I had looked at some of the Lua<->Cocoa bridges before, but since they generally also want to manage the lua_State object, it's not a simple drop-in thing :)

Cheers,
Chris