lua-users home
lua-l archive

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


Is there a way to get luac.exe to compile <all> files required by the
source? For example, if I have the following file:

-- <bar.lua>
function say_hi() print 'hello, world!' end

And now I have another file:

-- <foo.lua>
require 'bar.lua'
say_hi()

If I compile foo.lua -> foo.luac and execute it, it actually executes
the require() call and looks for bar.lua. This is terrible, because I
can't hide the source code. I suppose I could compile bar.lua ->
bar.luac and require *that* file, but that feels a whole lot more like
a hack than a solution...

-- 
Best regards,
 Jeff                          mailto:jma@insightbb.com