lua-users home
lua-l archive

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


Hello Tony,

Wednesday, October 5, 2016, 1:58:37 PM, you wrote:

can you please publish sources of your utility?

> If it helps, I have written a small Lua 5.3 script that unites all
> 'require'ments into a single file, and then you can compile this to get a
> stand-alone Lua executable.
> However, it will only work with pure Lua modules.  It will not work with
> binary modules (DLL, etc.)

> You can get it here:
> https://www.dropbox.com/s/ls0aku48u2ybgud/one.luac?dl=0
> You give as parameter the main Lua file, and redirect its output to the
> single file.  Example: lua one.luac main.lua > united.lua

> (I haven't found any Lua source that fails to work with this.  However, if
> you notice problems, let me know.  Maybe I can fix it.)

> -----Original Message----- 
> From: Meer, Hans van der
> Sent: Wednesday, October 05, 2016 11:51 AM
> To: Lua mailing list
> Subject: luac does what precisely?

> A question about luac. Do I understand correctly that luac precompiles the
> given lua file only and does not include the modules called in by a require
> statement inside? More precisely, that it does not generate something 
> functioning as a 'fully linked standalone binary'?
> And if I am right in this, is it possible to generate such a 'standalone
> binary', allowing one to call one file with all necessary precompiled code
> inside?

> Hans van der Meer









-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin@gmail.com