[ANN] amalgamated compilation for Lua

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[ANN] amalgamated compilation for Lua

Luiz Henrique de Figueiredo
A tiny package for amalgamated compilation of Lua 5.2 is now available at
        http://www.lua.org/extras/5.2/one.tar.gz

It includes three files: Makefile, README, and one.c, which was mentioned
here recently.

Here is the README:

    ---------------------------------------------------------------------

This code builds Lua as a single file. This reduces the number of public symbols
to the official C API and gives the compiler more room for optimization.

The Makefile builds three files: lua, luac, and liblua.o, which is the Lua
library as a single object file ready to be linked into your application.

Place this directory inside the src directory in the Lua distribution.
Then do "make" with a suitable target.

If you want to place this directory somewhere else, edit Makefile and change
the variable SRC to point to the src directory in the Lua distribution.

You can also give the value of SRC in the command line, as for instance in
        make SRC=/tmp/lua-5.2.3/src macosx

    ---------------------------------------------------------------------

All feedback welcome. Enjoy.
--lhf

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] amalgamated compilation for Lua

Tangent 128
On 12/12/2013 07:09 AM, Luiz Henrique de Figueiredo wrote:

> A tiny package for amalgamated compilation of Lua 5.2 is now available at
> http://www.lua.org/extras/5.2/one.tar.gz
>
> It includes three files: Makefile, README, and one.c, which was mentioned
> here recently.
>
> [snip]
>
> All feedback welcome. Enjoy.
> --lhf
Threw together and attached a quick-and-dirty script to process one.c &
the Lua sources into a SQLite-style "all source in a single big chunk"
file. Perhaps useful when you need to embed the Lua source in your own
project?

makeone.lua (885 bytes) Download Attachment