lua-users home
lua-l archive

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


Attached is my approach (in Lua land, everyone creates his own batteries...)

Requires a C compiler.  Tested on macOS only....

Attachment: luacc.lua
Description: Binary data


Oh yes, and it can eat its own dogfood, too: 

$ lua luacc.lua -o luacc luacc.lua

- mb

> Am 21.07.2020 um 22:29 schrieb Jasper Klein <jasper@klein.re>:
> 
> Hello,
> 
> I would like to announce that I've released v1.0.1 of my project 'dogfood' [1].
> Dogfood is a srlua alternative for creating self running Lua programs.
> 
> The main points where dogfood differs from srlua are;
> - One self containing executable.
> - Can embed multiple (non-binary) Lua modules in one executable.
> - No support for Lua 5.1 and older.
> 
> The dogfood executable has two parts; the 'dog' part containing the interpreter and the 'food' part which is a Lua script that is executed by the 'dog' part.
> When creating a self running Lua program, the food part extracts the interpreter (the dog part) from itself and then glues your Lua modules against it.
> This tool owes its name because of the reuse of its interpreter for the resulting program.
> 
> Building dogfood should be straightforward but requires boostrapping to join the dog and food parts. The provided makefile will do the bootstrap for you.
> However in case you have your own build environment, there are bootstrap shell scripts for Windows and Unix like systems as well.
> 
> -- Jasper Klein
> 
> [1] https://github.com/PG1003/dogfood
>