Re: Interested in lua2exe ?

  • From: steve donovan <steve.j.donovan@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Sat, 21 Jul 2012 11:11:29 +0200

On Fri, Jul 20, 2012 at 10:33 PM, Jay Carlson <nop@xxxxxxx> wrote:
> On Jul 19, 2012, at 4:03 AM, QuentinC wrote:
>> I have made a small program called lua2exe, which take one or more scripts 
>> and pack them into a standalone executable embedding the VM (luajit 
>>, lua51.dll still required). At the moment it's quite rahter basic.
> You should talk to Steve Donovan, who has performed yeoman service automating 
> the analogous thing for PUC-Rio Lua. See 
> . I'm sure a luajit option would be 
> of use.

Yes, the idea behind luabuild was to do custom builds of Lua 5.2,
optionally leaving out standard modules and including external
modules, ending up with a custom self-contained executable. I then use
Jay's soar to package multi-file scripts into an archive, and lhf's
srlua to bind that archive to the custom executable. Then no external
Lua shared libraries are needed, although the external modules may of
course need their own shared libraries.

It's perfectly possible to repeat this for LuaJIT, if there's
sufficient interest.  I consider it an interim solution until LuaDist
makes its build sufficiently flexible to produce this kind of
standalone solution.

For LuajIT of course, there is always the option of compiling any
needed Lua modules as byte code which is then linked into the final
executable, but soar's dynamic/static dependency analysis is still

steve d.

Other related posts: