Outdated egg!

This is an egg for CHICKEN 3, the unsupported old release. You're almost certainly looking for the CHICKEN 4 version of this egg, if it exists.

If it does not exist, there may be equivalent functionality provided by another egg; have a look at the egg index. Otherwise, please consider porting this egg to the current version of CHICKEN.


This is a port of the Stalin to CHICKEN, that is, Stalin hosted on the CHICKEN Scheme system. Stalin compiles a subset of R4RS Scheme to C code, which can subsequently be compiled to highly efficient self-contained executables.


libgc, the Boehm garbage collector must be installed and available in your linker path.


 chicken-stalin [OPTION ...] FILENAME

See the Stalin manual for information about the available command line options and general usage information.

Interfacing to CHICKEN code

A preliminary and rather clunky way of interfacing Stalin code with chicken-compiled code is provided. The extension stalin-externals provides a macro named define-stalin-external that allows defining entry-points which Stalin code can call in an embedded CHICKEN-compiled library.

Consider the file mixed.scm:

 ; mixed.scm - CHICKEN code
 (require-extension stalin-externals)
 (define-stalin-external (foo (int x) (c-string y)) c-string
   (print "got: " x " and " y)

A Stalin application uses this interface:

 ; mixed-stalin.scm
 (include "mixed-externals.scm")
 (display "starting...\n")
 (define x (foo 33 "test"))
 (display x)

Compiling mixed.scm will generate two files named mixed-externals.scm and mixed-externals.h. The C header file is used by the Stalin foreign-procedure interface and mixed-externals.scm defines the calling procedures for the CHICKEN entry points. Now we compiled mixed.scm as an embedded (that is without a main function) program:

 % csc -ce mixed.scm -X stalin-externals.scm
 % chicken-stalin -On -c mixed-stalin.scm
 % csc mixed.o mixed-stalin.c -C -I. -o mixed
 % ./mixed



The following extensions have been added to this version of stalin:


The compiler has been tested on Mac OS X 10.4 (ppc), and Linux (x86, amd64)



Jeffrey Mark Siskind, port to CHICKEN by felix winkelmann


Initial version


Copyright 1993, 1994, and 1995 University of Toronto. All rights reserved.
Copyright 1996 Technion. All rights reserved.
Copyright 1996 and 1997 University of Vermont. All rights reserved.
Copyright 1997, 1998, 1999, 2000, and 2001 NEC Research Institute, Inc. All
rights reserved.
Copyright 2002, 2003, 2004, 2005, and 2006 Purdue University. All rights
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.