[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: A guide to building Lua modules .. and what about standalone programs?
- From: Christian Thaeter <ct@...>
- Date: Tue, 15 Apr 2014 03:39:44 +0200
Am Mon, 14 Apr 2014 23:43:44 +0100
schrieb Kevin Martin <kev82@khn.org.uk>:
>
> On 14 Apr 2014, at 18:36, Christian Thaeter <ct@pipapo.org> wrote:
>
> > Its prolly doable with Rocks, but I haven't seen anyone using rocks
> > for this purpose. Are there any other installation/deployment
> > schemes common for lua programs?
>
> We have a system to do this, where the application i.e. Lua code/C
> modules/read only data are packaged in an SQLite3 database, and we
> have a specially built 'runner' program that knows how to load code
> from these databases to handle being executed from command line, or
> CGI. An application deployment is then simply a script like:
>
> #!/path/to/runner
> --Lua Code
> --Code to configure application including how to find/create code DB
>
> The main reasons we haven't open sourced it are:
>
> o It's POSIX only, and most POSIX people seem happy with srlua or
> similar - i.e. no interest. o It requires /dev/shm to be mounted with
> execute permissions - disabled by default on most systems (this is to
> extract the c libraries so we can dlopen them) o We don't have the
> time to write any decent documentation.
>
> If you're interested in how it works, or you think it sounds useful,
> I'm happy to go into more detail.
Interesting approach. I am currently doing something small for POSIX
only but would like to port it to windows eventually.
But back to my initial question. I a more interested in how people
package lua programs so that they could be installed in a portable
way. Not necessary shipping their own lua interpreter but figure out
whats installed on the system (lua, luajit, picking a suitable
version) figure out where the scripts and other resources/config files
need to be installed, maybe install rocks dependencies and so on. Of
course one could hack Makefiles or other build systems ('make install')
to do such or build packages for each target (.deb, .rpm, ...). I am
just wondering if there is a more lua'ish portable way to deploy lua
programs.
Thanks
Christian