[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Embedding Lua bytecode in C binary
- From: Asko Kauppi <askok@...>
- Date: Thu, 27 Nov 2008 10:46:58 +0200
I prefer to use a bin2c.lua script instead of the C code that comes
You'll find it i.e. within the Lanes sources, which bakes in some Lua
code into its binary module.
I don't use the package mode (i.e. 'require') for getting at these
Grant Robinson kirjoitti 27.11.2008 kello 8:32:
I'm using Lua for a library that exposes a C API, but internally is
using Lua for some of the functionality. I would really like to embed
my Lua modules directly into the binary. Having done some perusing of
Google and friends, it appears that bin2c (from
<http://lua-users.org/wiki/BinToCee>) and the LOOP pre-compilation and
pre-loading scripts (from
<http://loop.luaforge.net/release/preload.html>) both look like fairly
decent possibilities. I was hoping to get some feedback of what
approaches others here have used, and what people have found that
works best. Most of the Lua code that I would like to embed is
written using the Lua 5.1 package model, so that is a consideration
that needs to be kept in mind.
Any feedback would be greatly appreciated.