[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua plugin manager library
- From: Peter Drahoš <drahosp@...>
- Date: Sat, 16 Feb 2013 11:21:36 +0100
On 15 Feb, 2013, at 20:36 , Hadriel Kaplan <HKaplan@acmepacket.com> wrote:
> Does anyone know of an open-source library one could use in an application to provide the underlying code for managing Lua scripts used as plugins? I.e., to let a C/C++ application which uses Lua for "plugins" provide a list, search, and retrieve mechanisms for Lua plugins, from their application-providers site? Something like sparkle/winsparkle but cross-platform, and preferably without a GUI component? I guess basically like LuaRocks, but meant for C/C++ application integration.
Hisham already mentioned LuaRocks which focuses mostly on Lua based modules. If you want something that can build C/C++ apps too have a look a LuaDist which uses CMake to build just about anything. The "dist" namespace it uses can be accessed from lua and used directly to install modules on runtime eg:
local luadist = require "dist"
The code of the deployment utility and "dist" library is only a fraction of the size of LuaRocks as most of the work is done by using CMake as external build tool. However it does support binary modules which are simple downloads stored in orphan branches of the module repositories. Writing a C downloader for that should be trivial.