[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua script to executable, including C modules
- From: Dirk Laurie <dirk.laurie@...>
- Date: Sat, 23 May 2015 06:38:46 +0200
2015-05-23 3:01 GMT+02:00 Simon Cozens <firstname.lastname@example.org>:
> I understand a good way to get a pure Lua script into a compiled
> executable is with srlua. However, I don't have a pure Lua script - I'm
> using C-based Lua modules like lpeg and luaexpat, and I also have a
> couple of custom Lua libraries implemented in C which interface with
> harfbuzz and other C libraries.
> I don't understand how to get these additional C libraries and
> extensions built and linked in to the executable in that situation. I
> guess I can create a custom version of srlua that links and loads them
> all in, but has anyone already done something which makes this easier?
1. LuaTeX is a huge executable that includes Lua 5.2 and many C modules.
Some, e.g. lpeg, luafilesystem, lzip are preloaded; most are compiled in
but need a "require" to be activated. It has a mode which ls like standalone
Lua without the interactive bit.
2. Love2D is a mostly C program that links in multimedia libraries from
the host system that look like system-independent object-based
routines to the user's Lua script, which is implemented via callbacks.
Both of these are in all standard Linux distributions and are supposed
to run on other systems too. I can confirm personally that Love2D runs