I saved this simple program
(defun hello-world ()
(format t "Hello, world"))
(defun main ()
(hello-world))
using ccl:save-application
(ccl:save-application "test"
:toplevel-function #'main
:prepend-kernel t
:purify t
:impurify t)
from the Clozure Common Lisp REPL.
The resulting executable has a size of 25M on Mac OS X. I understand that it contains the Lisp kernel and an in-memory representation of the Lisp system. Still 25M seems somewhat big for such a simple program. The parameters purify
and impurify
do not seem to have much of an effect.
What options do I have to reduce the size of the executable? Are there any?
There is not much you can do with CCL.
One thing possible might be to create a smaller base image using a custom configuration by not recording various debug informations (arglists, documentation, source locations, ...).
You can also compress the executable and ship the compressed file.
CCL AFAIK lacks delivery tools to shrink the application - tools like those of Allegro CL and LispWorks.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With