Skip to content

Instantly share code, notes, and snippets.

@lamberta
lamberta / gist:212583
Created October 18, 2009 06:58
save sbcl core as an executable
;;;save sbcl core as an executable
;;;http://www.sbcl.org/manual/Saving-a-Core-Image.html
(sb-ext:save-lisp-and-die "myexec" ;file name
:executable t ;create a standalone executable
:toplevel 'main ;function to run when core is resumed
:purify t) ;purifying gc to move dynamic objs to static space
@lamberta
lamberta / demo-cffi.lisp
Created October 18, 2009 02:53
use C shared lib with cffi
;;;building a C shared library,
;;;and calling it in Common Lisp with CFFI
(require :asdf)
(asdf:load-system :cffi)
(defpackage :cffi-user
(:use :common-lisp :cffi))
(in-package :cffi-user)