busybox and small scripting languages on FreeBSD ? (was Re: 80 Mb / enough for 7.x? OK to delete /stand/ and /modules/ ?)

Andrew MacIntyre andymac at bullseye.apana.org.au
Sun Aug 3 02:29:23 UTC 2008


Luigi Rizzo wrote:
> Also, what would you suggest as a small scripting language to be used
> in this kind of platform for implementing CGI scripts (and preferably
> able to use sockets/select) ?
> 
> The various perl/python/php and friend are in the 10MB range once you
> pick up a little bit of libraries (sockets etc) and the tangle of
> modules they require; awk (which is present in busybox) is ok-ish for
> some things, but doing I/O and calling external programs with it is
 > very unfriendly;

I've not tried to do this myself (had no need), but Python does support
having its standard library code in a ZIP archive.  The .py (source)
files can be omitted, so the ZIP archive only needs to contain the byte
compiled files (.pyc, and .pyo if you ever use Python's -O option).
With a stripped interpreter, I'd estimate you might get an install
down to ~6MB, with non-essentials (for an embedded production
environment) removed.  But you do have to work at it... :-(

I hear Lua is compact and capable, including sockets support, but have
never looked at it.

-- 
-------------------------------------------------------------------------
Andrew I MacIntyre                     "These thoughts are mine alone..."
E-mail: andymac at bullseye.apana.org.au  (pref) | Snail: PO Box 370
        andymac at pcug.org.au             (alt) |        Belconnen ACT 2616
Web:    http://www.andymac.org/               |        Australia


More information about the freebsd-stable mailing list