[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] reducing the size of chicken runtime
From: |
Peter Bex |
Subject: |
Re: [Chicken-users] reducing the size of chicken runtime |
Date: |
Thu, 19 Nov 2015 17:30:31 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Thu, Nov 19, 2015 at 03:52:23PM +0000, Victor J wrote:
> Currently, a statically linked "hello world" executable is 1.7MB (stripped).
> Is it possible to strip out some unnecessary features (i.e. R5RS stuff,
> numeric tower, etc) so that the runtime is more suitable for an embedded (low
> memory) system?
Hi Victor,
It can be done, but it's a little painful. There's some information on
how to do that on the wiki:
http://wiki.call-cc.org/generating%20the%20smallest%20possible,%20self-contained%20executable
Note that there's no "numeric tower" in CHICKEN 4; there's only fixnums
and flonums, and the core needs both. In CHICKEN 5, there's a numeric
tower.
Perhaps it is a nice goal for CHICKEN 5.1 or perhaps 6 to make it easier
to build smaller self-contained binaries. Because CHICKEN 5 is more
explicitly structured as separate modules, it should (theoretically)
be easier to figure out internal dependencies and split it up.
Unfortunately, making the components of CHICKEN more fine-grained also
(currently) means we'll generate more toplevels, which results in a
longer startup time.
If binary size is really your main concern, you might want to take a
look at Chibi Scheme: it is quite modular and has many compilation-time
options for stripping it down to the bare minimum.
Cheers,
Peter
signature.asc
Description: Digital signature