lua-users home
lua-l archive

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


Hi Paige DePol
"including embedding pre-compiled Lua scripts if you do not require the scripts to change at run time"

Above thing is in my task list. Now I am on my way to make sure all my requirements are satisfied.
Embedding pre-compiled Lua script, I really need to learn how to do it, as I hope it will increase the performance.

Austin


On Sat, Jun 28, 2014 at 2:40 PM, Paige DePol <lual@serfnet.org> wrote:
On Jun 28, 2014, at 4:00 AM, Austin Einter <austin.einter@gmail.com> wrote:

> With all your help, I got it working.
>
> It is really a pleasure to work with C/Lua combination as frequent C code modification can be avoided.
>
> Austin

Unless you embed your Lua code into your C code, then you still have to compile your C code for your Lua changes to take effect. Frequently there is a separation of coding duties between C-land and Lua-land, which is why it can be helpful for your program to be able to dynamically load the scripts externally. This way the scripts can be modified without requiring the program to be recompiled, at least for debugging builds. For release builds you can do any number of things, including embedding pre-compiled Lua scripts if you do not require the scripts to change at run time.

Happy to hear you got your script up and running, good luck with your future Lua endeavours! :)

~pmd