Hi, Please excuse me for the long post.
I'm a contributor of Tarantool - an efficient in-memory database and a Lua application server (blended). We plan to add a Lua package manager in the next release. LuaRocks seems to be a good candidate. I would like to clarify some details about available options for configuring/extending LuaRocks to distribute Lua modules for the application. Tarantool supports five types of modules: 1. Pure Lua modules 2. Lua/C API modules 3. Pure Lua modules that use LuaJIT extensions (FFI) 4. Pure Lua modules that use Tarantool extensions 5. Lua/C API modules that use Tarantool extensions Classic Lua does not support 3-5 modules and LuaJIT does not support 4-5 modules, so here is no reason to install all modules to a same path. A good directory structure for the case can look like the following: * 1 -> ${PREFIX}/share/lua/5.1/?.lua * 2 -> ${PREFIX}/lib/lua/5.1/?.so * 3 -> ${PREFIX}/share/luajit-2.0/?.lua * 4 -> ${PREFIX}/share/tarantool/lua/?.lua * 5 -> ${PREFIX}/lib/tarantool/lua/?.so 3 modules should depend "ffi" and 4-5 modules should depend on "tarantool". As a result: * Classic Lua does not try to load LuaJIT and Tarantool modules * LuaJIT does not try to load Tarantool modules * LuaRocks does not try to install LuaJIT modules if LuaJIT is not installed * LuaRocks does not try to install Tarantool modules if Tarantool is not installed * The user is able to manage all Lua modules using single tool Is it possible to support proposed directory structure using LuaRocks depending on rockspec content? How to manage dependencies for "ffi" and "tarantool"? Alternatively, I can try to make a customized copy of /usr/bin/luarocks scripts (say, tarantool-rocks) to use different directories: "${HOME}/.tarantoolrocks/" insteadof "${HOME}/.luarocks/" "${PREFIX}/lib/tarantool/rocks" insteadof "${PREFIX}/lib/luarocks/rocks" "${PREFIX}/share/tarantool/modules/" insteadof "${PREFIX}/share/lua/5.1/" "${PREFIX}/lib/tarantool/modules/" insteadof "${PREFIX}/lib/lua/5.1/" As a result, all modules installed by "tarantool-rocks" are placed in different directories from classic Lua. Is this the right usage of LuaRocks? Any suggestions about described use case and proposed solutions? I would be grateful for any help you are able to provide. Thanks! -- WBR, Roman Tsisyk <ro...@tarantool.org> http://tarantool.org/ - an efficient in-memory database and a Lua application server ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk _______________________________________________ Luarocks-developers mailing list Luarocks-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/luarocks-developers