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?