(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 <aquahobby...@proton.me>

Attachment: lua
Description: Binary data

_______________________________________________
Toybox mailing list
Toybox@lists.landley.net
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to