lua-users home
lua-l archive

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


I agree that init system in Lua would be great. Half a year ago I seached Internet if there was something like that, because the embedded systems I work on, would benefit on faster boot times (to comply to regulations in some markets).

For system library:
I recommend to take look at nixio. nixio covers both filesystem and sockets. The sockets part is far better than Lua sockets (nixio support IPv6, returns all IO errors to the application so they can be handled, asyncrchonous I/O is correctly supported according to Posix). I also think nixio has an edge over lposix.

I belive nixio is extensively used in openwrt.org, an other embedded Linux distro.

http://luci.subsignal.org/trac/browser/luci/trunk/libs/nixio
http://luci.subsignal.org/api/nixio/index.html

<disclamer>
I am not related to any of the projects. I am a plain user of Lua for embedded projects.
</disclamer>


Egil


Den 2011-11-17 10:20, skrev Natanael Copa:
Hi,

So we (Alpine Linux) are playing with the idea of having an init
system with lua for Linux. The idea is that instead of writing start
up scripts in shell you write them in lua. I think this makes much
sense because:
* you avoid many forks = speed up
* you can have scripts instead of compiled C stuff
* you have a nice language which gives you arrays/hash tables etc for
a low price (half size of bash)
* lots smaller than glib - you can have a very small base system

This means that if we want have the possibility to have /usr on
separate partition we must move Lua out from /usr.

This is easily done with /usr/bin/lua and /usr/lib/liblua*. My
question now is, what about pluggable modules? /usr/lib/lua can move
to /lib/lua but what about /usr/share/lua? I don't like the idea of
moving it to /share/lua. Suggestions?

Since this means we will replace lots of shell scripts with lua, are
there any lua modules for typical shell things? like mv, cp, ps, kill
etc.

Does anyone know similar projects? (bsdlua is one)

Thanks!