[armedbear-devel] Deploying compiled ABCL apps/elements

Eric Marsden eric.marsden at free.fr
Sun Jul 26 13:45:57 UTC 2009

>>>>> "as" == Alessio Stalla <alessiostalla at gmail.com> writes:

  as> The other solution, maybe less optimal but much easier imho, is to
  as> expose the api for loading files from jars and integrate it with LOAD
  as> (that is, with Lisp pathnames), and maybe provide a nice function to
  as> package a bunch of compiled Lisp files (say, from a given directory)
  as> into a jar to be deployed together with abcl.jar. I haven't thought
  as> about this in depth so there might be conceptual problems, I don't
  as> know. But if it can be done, it's not hard to do.

  I've had a first stab at doing this; it works OK in light testing.

  To compile files to a zip file (existing functionality in ABCL), do

    (let ((sys::*compile-file-zip* t))
      (compile-file "foo.lisp" :output-file "/tmp/foo.jar"))

   To load from that jar, apply the attached patch and use

     (load "jar:file:/tmp/foo.jar!/foo")

   You can bundle your compiled files with ABCL in a single jar and load
   directly from that (you'd need to fiddle with "getResource" to know
   your home jar filename; possibly we should set EXT:*LISP-HOME* to
   that when running from a jar). 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: load-jar.diff
Type: text/x-diff
Size: 4062 bytes
Desc: Allow loading from a FASL stored in a jar file
URL: <https://mailman.common-lisp.net/pipermail/armedbear-devel/attachments/20090726/0d3a8a12/attachment.diff>
-------------- next part --------------

Eric Marsden

More information about the armedbear-devel mailing list