[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: How to make a static Lua?
- From: Marc Balmer <marc@...>
- Date: Sun, 17 Apr 2016 10:51:59 +0200
> Am 17.04.2016 um 03:09 schrieb Steve Litt <firstname.lastname@example.org>:
> Hi all,
> After introduction of the systemd init system, a lot of people are
> creating their own init systems. One guy did it in Ruby.
> I'm thinking that Lua is much smaller than Ruby, and in my opinion it's
> more understandable, and from what I read, it's faster. The reason it
> would be good to be static is so that an initramfs wouldn't be
> necessary (though it usually is for other reasons). But static
> compilation isn't absolutely necessary: all the libraries could go in
> an initramfs.
> The version of Lua for this thing would need to have signal handling,
> forking, and exec'ing. Are those features in place with standard Lua?
I have written a unix module to provide unix functionality to Lua programs. We use it to write daemons in Lua.
See github.com/arcapos/luaunix if you are interested.
> Is 5.3 available pretty much everywhere these days? If not, which Lua
> is the most widely available?
Since such a systemd like program is run early in the boot process, I suggest you write a small core in C that statically links against Lua 5.3.
> Steve Litt
> April 2016 featured book: Rapid Learning for the 21st Century