[Toybox] [mkroot] mkroot package to build lua

Oliver Webb aquahobbyist at proton.me
Fri Apr 19 23:04:10 PDT 2024


(Posting this to the list because discussion on the list is preferred over GitHub)

Since there is discussion about building a ruby interpreter under mkroot.
I decided to take a shot at building a lua interpreter under mkroot.

This is as easy as easy can be. Being pure ANSI C, there are a few minor complications
though. Lua needs ar to build (a previous unneeded dependency), configuration
system stuff if I had to guess. And the default CC is "gcc --std=gnu99" which....

Lua is fairly small (30K LOC that compiles to ~300K statically linked with musl),
simplistic, and software that aligns with some of the design principles (Having a
few simple base concepts and extending them with syntax sugar to elegantly provide
multi-paradigm programming instead of staking layers of "MOAR FEATURES!!!" on until
the spec looks like Perl's or C++'s) but is probably out of scope for toybox if I 
had to guess (Although I was sure about that for the compiler before I bothered to
ask).

mkroot package is attached, not as a patch because I'm not really sure if this is
something that would want to be added. It fit's enough that I felt like I should submit
it, but then again linux already has a language in the form of the shell (And awk (and m4
and make counting the toolchain) (And bc technically (And sed if you wanna get _really_
technical))).

-   Oliver Webb <aquahobbyist at proton.me>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lua
Type: application/octet-stream
Size: 410 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20240420/eabfb1d1/attachment.obj>


More information about the Toybox mailing list