About
CL-STORE is a package written by Sean Ross
for serializing and deserializing CL objects from streams
It has been tested and works on -
- SBCL (0.8.10.12) on Linux x86
- CMUCL (CVS Head 2003-09-14) on Linux x86
- CLISP (2.33) on Linux x86 and Windows
- Lispworks Personal Edition 4.3 on Linux x86 and Windows
- Allegro CL Trial Edition 6.2 [Linux (x86)]
- OpenMCL is supported but is largely untested.
- ECL (Embeddable Common-Lisp) 0.9d
CL-STORE is licensed under the MIT Licence.
Notes
- Clisp, OpenMCL and Allegro CL do not support serializing structure instances.
CL-STORE currently supports serialization of
- All numbers (float, ratios, integers, complexes)
- Character, and Strings
- Vectors and Arrays
- Hash Tables
- Lists
- Instances of Structures
- Instances of CLOS Classes
- Conditions
- CLOS Classes
- Structure definitions (SBCL and CMUCL only)
- Functions (Serializes the function name)
- Generic Functions (Serializes the GF Name)
- And Combinations of the above
Hopefully one day proper functions and closures will be added.
Example:
;; Store a class and instance
cl-user(1): (defclass foo ()
((bar :accessor bar :initarg :bar)))
cl-user(2): (cl-store:store (list (find-class 'foo)
#'bar
(make-instance 'foo :bar "bar"))
"test.out")
;; Then restore them in a fresh lisp session
cl-user(1): (let ((vals (cl-store:restore "test.out")))
(funcall (second vals) (third vals)))
=> "bar"
Documentation
Mailing Lists
Download (Latest Version 0.8.10 02/11/2009)
or if you have asdf-install try (asdf-install:install :cl-store). This is my public key.
CVS
The CVS Repository is no longer used. Please use the darcs repository instead.
Darcs
The darcs repository is available using
darcs get http://common-lisp.net/project/cl-store/darcs/cl-store/