Official chibi-scheme repository
Find a file
Alex Shinn 1cdd7edfa5 adding support for dynamic loading shared libraries
load now recognizes ".so" files and loads them with dlopen,
then calls sexp_init_library(ctx, env) from that library.
2009-11-05 20:41:01 +09:00
include/chibi adding support for dynamic loading shared libraries 2009-11-05 20:41:01 +09:00
lib/srfi adding some handy syntax modules 2009-11-03 01:44:36 +09:00
opt fixnum/integer naming cleanup 2009-11-02 23:39:42 +09:00
tests adding extended numeric tests and fixes for the bignum bugs it turned up 2009-07-15 23:56:51 +09:00
.hgignore committing initial bignum support, still needs more thorough testing. 2009-07-07 19:16:23 +09:00
config.scm installing config file, fixing installed module search path 2009-11-03 12:54:06 +09:00
debug.c initial module system 2009-10-13 18:29:18 +09:00
eval.c adding support for dynamic loading shared libraries 2009-11-05 20:41:01 +09:00
gc.c fixnum/integer naming cleanup 2009-11-02 23:39:42 +09:00
init.scm stripping syntactic-closures in syntax-rules error messages 2009-11-03 12:57:38 +09:00
main.c adding support for dynamic loading shared libraries 2009-11-05 20:41:01 +09:00
Makefile adding support for dynamic loading shared libraries 2009-11-05 20:41:01 +09:00
mkfile fixing the mk test target to test with $O.out 2009-07-14 01:09:59 +09:00
opcodes.c stripping syntactic-closures in syntax-rules error messages 2009-11-03 12:57:38 +09:00
README committing initial bignum support, still needs more thorough testing. 2009-07-07 19:16:23 +09:00
sexp.c fixnum/integer naming cleanup 2009-11-02 23:39:42 +09:00
TODO adding todo list 2009-11-02 01:31:23 +09:00
VERSION committing initial bignum support, still needs more thorough testing. 2009-07-07 19:16:23 +09:00

                             Chibi-Scheme
                            --------------
                                   
    Minimal Scheme Implementation for use as an Extension Language

              http://synthcode.com/wiki/chibi-scheme/


Chibi-Scheme is a very small but mostly complete R5RS Scheme
implementation using a reasonably fast custom VM.  Chibi-Scheme tries
as much as possible not to trade its small size by cutting corners,
and provides full continuations, both low and high-level hygienic
macros based on syntactic-closures, string ports and exceptions.
Chibi-Scheme is written in highly portable C and supports multiple
simultaneous VM instances to run.

To build, just run "make".  This will provide a shared library
"libchibi-scheme", as well as a sample "chibi-scheme" command-line
repl.  The "chibi-scheme-static" make target builds an equivalent
static executable.

You can edit the file config.h for a number of settings, mostly
disabling features to make the executable smaller.  You can specify
standard options directly as arguments to make, for example

  make CFLAGS=-Os

to optimize for size, or

  make LDFLAGS=-L/usr/local/lib CPPFLAGS=-I/usr/local/include

to compile against a library installed in /usr/local.

By default Chibi uses a custom, precise, non-moving GC.  You can link
against the Boehm conservative GC by editing the config file, or
directly from make with:

  make USE_BOEHM=1

See the file main.c for an example of using chibi-scheme as a library.
The essential functions to remember are:

  sexp_make_context(NULL, NULL, NULL)
    returns a new context

  sexp_eval(context, expr)
    evaluates an s-expression

  sexp_eval_string(context, str)
    reads an s-expression from str and evaluates it