lua-users home
lua-l archive

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


On 15 Feb, 2013, at 20:36 , Hadriel Kaplan <HKaplan@acmepacket.com> wrote:

> Howdy,
> 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[1] 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"
dist.install("expat")

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[2]. Writing a C downloader for that should be trivial.

pd

[1] www.luadist.org
[2] https://github.com/LuaDist/lua/tree/Windows-x86