Scheme implementation comparison table
Looking from the outside into the Scheme world


Table of Contents

Comparison between Scheme implementations

This guide was written by someone looking from the outside in, so, without much experience. Therefore, inconsistencies an important omissions may take place. Please, refer to the footnotes as they will include more information and explanations.

The motivation for doing this comparison chart is to select an Scheme implementation with which an Ada/GNAT bootstrapping compiler could be created. Some of the more important aspects that we are looking for are:

Implementation Type License OS support Arch support1 Scheme Standard Build dependencies Runtime dependencies Can be X-compiled Supports X-compiling TCC support2 Library support3 Full numeric tower Full tail recursion optimisation CPS (Continuation Passing Style) Macro support Define types FFI (Foreign Function Interface) Unicode support Embeddable Runs on RISC-V/Linux Build-project system Notes
Chez Compiler, Interpreter Apache v2 Linux, OSX, Windows, Android4 *x86, arm[6], powerpc, more? R6RS C compiler None? ?? Does not seem like it Yes4                 Seems like it       Needs itself to compile itself -> bootstrap problem
Chibi Scheme VM-Interpreter BSDv3 Linux, *BSD, Solaris, Plan 9, Android, iOS, WASM, OSX, Windows Everything supported by the C compiler? R7RS C compiler, GNU Make recommended None, can use Boehm-GC More or less yes5 - Yes6 R7RS small, some SRFIs Yes Yes Yes syntax-rules, SRFI-46, low-level hygienic with syntactic-closures interface Yes, SRFI-9, SRFI-99 Yes Yes Yes, goal of the implementation   No  
Chicken 5 Compiler7, Interpreter BSDv3 Linux, *BSD, Solaris, Hurd, Haiku, Android, Windows, OSX, more? Everything supported by the C compiler? R5RS, R7RS8 C compiler9, GNU Make None10 Yes Yes Yes   Yes Yes Yes syntax-rules, implicit and explicit renaming macro transformers SRFI-9 (built-in), SRFI-99 (egg). Yes11 Yes No/Yes12 Using -embedded can create .so Yes Yes Has some autogenerated Scheme files
Cyclone Compiler7, Interpreter MIT Linux, FreeBSD, OSX, Windows Know to run on *x86, and arm[7-8] R7RS C compiler, GNU Make, libtommath, concurrencykit ConcurrencyKit ?? Maybe with the generated C code   R7RS large               No, can create .so?     Requires and has a bootstrap
Gambit Compiler7-Translator, Interpreter Apache v2 and LGPLv2.1 Linux, *BSDs, OSX, Windows, JavaScript, iOS, NintendoDS, FPGAs… Everything supported by the C compiler? R4RS, R5RS, R7RS C compiler, GNU Make, (autotools) None Yes Yes Yes CC=tcc                 Can create .so Yes    
Gauche VM-Interpreter BSDv3 Unix-like, Android Everything supported by the C compiler…? R7RS C compiler, GNU Make, (autotools) (libiconv?, Mbed TLS, pthreads)13 None ??/Likely - No, requires C++ (gc)                       It is still not v1.0, but should be there closely
Gerbil Compiler, Interpreter Apache v2 and LGPLv2.1 Gambit's support Gambit's support R5RS, R7RS Gambit, libcrypto None Likely ?? -             Yes          
GNU Guile 3 VM-Interpreter, JIT GPLv3, Library LGPLv3 Linux, *BSD, Solaris, Hurd, Windows, OSX Everything supported by the C compiler? R5RS, R6RS, R7RS C compiler, GNU Make, pkg-config, runtime dependencies GMP, libFFI, Boehm-GC, libltdl, libunistring Yes - No               Yes? Yes, official GNU scripting lang   No14 Fully bootstrapped and reproducible
Loko Scheme Compiler EUPL-1.2 Linux, NetBSD, Bare-metal x8664 x8664 R6RS, R7RS C compiler, GNU Make, Akku, see Notes None Yes Yes15                         Requires bootstrap from another Scheme compiler…
Racket16, 17 VM-Interpreter, Wierd compiler MIT and Apache v2, Runtime LGPLv3 Linux, FreeBSD, OSX, Windows Mostly everything Everything? C compiler, GNU Make, libffi None? Yes Yes18   Huge             Yes No   Yes? Biggest Scheme implementation, it is basically its own language
Ribbit VM-Interpreter BSDv3 Any target language Any target language Subset                                  
S7 Interpreter 0-clause-BSD (simpler ISC) LibC Everything supported by the C compiler? R5RS19, R7RS C compiler None Yes - Yes20   Yes/Mostly21 Yes Yes Low-level: CL-style define-macro SRFI-9, SRFI-99 and setters22 Yes Yes/Fully manual23 Meant to, main design Yes24 No Extremely minimal (once .c and one .h file). Modelled after Guile 1.8
SCM VM-Interpreter, Compiler7 LGPLv3 Amiga, Atari, Linux, OSX, MS-DOS, Windows, OS/2, VMS, *NIX Everything supported by the C compiler R5RS C compiler, GNU Make, SLIB25, (autotools) None Yes Maybe with the generated C code No, compiler errors R5RS plus SLIB               Yes   No  
STklos VM-Interpreter GPLv2 Linux, OSX, Windows, Android (used to work in many others) Everything supported by the C compiler R7RS C compiler, GNU Make, Bohem-GC?, GMPLite?, PCRE?, FFI?, pthreads? (autotools) <- C++ deps! None, Unlikely - No, requires C++, also26 R7RS               Yes?   Package manager  
TR7 VM-Interpreter BSD-0 LibC Everything supported by the C compiler R7RS C compiler None Yes - Yes R7RS Yes Yes Yes In the works ? ? Yes Yes Needs work No Still fresh. Based on TinyScheme
Embedded CL Compiler7, Interpreter LGPLv2 Linux, *BSD, Solaris, Android, Windows, OSX x86*, sparc, arm[6-8], alpha, powerpc Comon Lisp ANSI X3J12 C compiler, GNU Make, libatomicops27, Boehm-GC (autotools) None if built-in Yes Yes No, requires C++ (gc) Lisp               Yes Yes Yes, ASDF  
Lua VM-Interpreter MIT Aix, *BSD, Linux, C89, POSIX, Solaris, OSX, Windows Everything supported by the C compiler? Lua, no formal specification C compiler, Make28 None Yes - Yes, minor patch - +- ? ? No? ? Yes Basic Yes Yes LuaRocks Not lispy
TCL VM-Interpreter MIT   Everything supported by the C compiler? TCL C compiler None Yes - Yes TCL           Yes Yes Yes Yes? None?  
Jim TCL VM-Interpreter BSDv2   Everything supported by the C compiler? Most of TCL C compiler, autosetup29 None Yes - Yes Some extras           Yes Yes Yes Yes None?  

Deeper look into selected Scheme implementations

These implementations were chosen because they can be comiled by TCC and they seem to compile to a large number of targets.

Implementation Type License Arch support Scheme Standart Library support, SRFIs3 SLOC Requires pregenerated files Weight (RISC-V) Drawbacks Advantages Comments
Chibi Scheme VM-Interpreter BSDv3 C compiler and LibC R7RS Quite a few30 ~85_00031 No, with a catch32 237KB5, 1.2MB, 1.7MB static33 Cross-compiling is not that straight forward. Not very performant Great license for reusability  
Chicken 5 Compiler, Interpreter BSDv3 C compiler and LibC R5RS, R7RS Quite a few34 ~620_00035 Yes36 2.4MB37 Requires pregenerated Scheme files, requires GNU Make Great license for reusability  
Gambit Compiler, Interpreter Apache v2, LGPLv2.1 C compiler, LibC and common OSs R4RS, R5RS, R7RS Quite a few38 ~1_700_00039 Yes40   Requires autotools, GNU Make Potentially one of the most complete and performat implementations Check which which parts of the library are under LGPL.
Ribbit VM-Interpreter BSDv3   Subset None ~6_50041 Non Scheme files seem to be pregenerated   Minimal bootstrapping implementation    
S7 VM-Interpreter 0-BSD C compiler and LibC R5RS, partial R7RS Basic42 82_60543 No 2.7MB44, 2.0MB static24 Compiling to RISC-V staticly is not so simple45. Reduced library support Smallest implementation by far. Extremely easy to compile. Great license for reusability  
TR7 VM-Interpreter 0-BSD C compiler and LibC R7RS Basic ~13_60046 No 715KB47 Very fresh and still unfinished. Still has errors while testing in RISC-V Incredibly small and targets R7RS Keep an eye on it
Lua VM-Interpreter MIT C compiler, LibC and common OSs - - ~20_00048 No 210KB49 No defined standard Very small Worth it compared to Schemes?
Jim TCL VM-Interpreter BSDv2 C compiler, LibC and common OSs - - 41_20050, 21_000 autosetup29 No? 1.4MB static51 TCL is a bit quirky. Jim is not THE standard TCL TCL is extremely flexible. Core is small. Most tests pass52!  

Things that could also be interesting

  • Silex: a lexer generator for R5RS/R7RS implementations. See Github.



A lot of the information presented has been taken by the package support in Debian Sid as of <2022-04-28 Do>.


TCC is the Tiny C compiler. This is an important compiler since it is used in the first stages of the Guile/World bootstrapping system. For more information see Live-bootstrap.


There is this wonderful page that lists all SRFIs and known implementations that supports them.


Compiled with default flags: -O3 -g3, dynamicly. JUST THE CHIBI EXECUTABLE! Cannot cross-compile cleanly directly as the libraries need to be built by the executable, which does not run natively. In order to fix this, we follow a two step compilation process, see this procedure.


Some tests fail, they are mostly related to mathematical operations having the wrong sign.


Requires a C compiler on the host in order to compile Scheme. It basically translates Scheme into C and compiles it.


R7RS support is added by explicitly including the R7RS egg (Chicken jargon for extension).


It is known to work with the Tiny C Compiler. It would not surprise me if it worked with other "small" compilers.


The dependence on LibC is said to be small, which means it could run on a customised LibC.


Requires the probably non-portable (chicken type) import.


The compiler, as of <2022-05-15 So> does not support UTF-8. However, a major rewrite is taking place that will add it. The UTF-8 egg is what currently provides support.


Can be turned off.


There is the package hall that does it however.


Minimal variant.


It uses Chez Scheme at its core.


R5RS differences.


touch mus-config.h && tcc -c s7.c -I. && tcc -o repl repl.c s7.o -lm -I. && ./repl May require a patch to enable/force WITH_GCC Already fixed <2022-06-25 Sa>.


For multiprecision arithmetic, GMP, MPFR, MPC are needed…


setters are likely to not be portable.


From this mailing list discussion, it seem it does support it but only when entered raw… So a very rudimentary way.


Compiled with $CC s7.c -o s7-riscv -I. -DWITH_MAIN -DWITH_C_LOADER=0 -static -Os -lm -pthread -Wl,-export-dynamic and stripped.

In order for S7 to be useful with the C library, it needs is generated automatically by S7 when it loads r7rs.scm or libc.scm. It transpiles libc.scm to C producing libc_s7.c. Then it loads cload.scm to compile the generated libc_s7.c into

The technique that is theorised but still not successfully used to cross-compile S7 would be:

  1. Compile S7 natively, for example: gcc s7.c -o s7 -DWITH_MAIN -I. -O2 -g -ldl -lm -Wl,-export-dynamic or tcc -o s7 s7.c -I. -lm -DWITH_MAIN -ldl -rdynamic -DWITH_C_LOADER
    1. -Wl,-export-dynamic is needed! Otherwise some symbols, such as s7_f will not be found and loading will fail.
  2. Run ./s7 r7rs.scm so that S7 generates libc_s7.c
  3. Compile S7 with a cross-compiler riscv32-buildroot-linux-gnu-gcc s7.c -o s7-riscv -DWITH_MAIN -DWITH_C_LOADER=1 -ldl -static -Os -lm -I. -Wl,-export-dynamic
  4. Cross compile libc_s7.c, for example riscv32-buildroot-linux-gnu-gcc libc_s7.c -o -shared -rdynamic -DWITH_MAIN -DWITH_C_LOADER=1 -Os -ldl -lm -I. -pthread -Wl,-export-dynamic

The method described above does not work as symbols are still not found:

s7: 22-Jun-2022
load /mnt/s7/ failed: /mnt/s7/ undefined symbol: s7_f

;unbound variable (symbol "\x7f;ELF\x01;\x01;\x01;")
;    (symbol "\x7f;ELF\x01;\x01;\x01;")
;, line 1, position: 7

;unbound variable fileno in (fileno stdin)
;    (fileno stdin)
;    repl.scm, line 207, position: 6849
; (fileno stdin)
; ((terminal-fd (fileno stdin)) (tab-as-spa...
; ((lambda (hook lst) (when (or (not (proce...

;unbound variable *repl*
; (*repl* 'run)
; ((*repl* 'run))
; ((lambda (new-size) (unless (= new-size h... ; histsize: 100, histpos: 0
;                                              histbuf: #("" "" "" "" ...)

Maybe libc_s7.c could be compiled directly into s7?



tcc -DHAVE_CONFIG_H -I. -I. -I./../gc/include -I../gc/include `./ .. .. --cflags`   -g -Wall -Wextra -Wno-unused-label -fPIC  -c box.c
In file included from box.c:35:
In file included from gauche.h:124:
In file included from ./gauche/float.h:43:
In file included from /usr/include/complex.h:110:
/usr/include/bits/cmathcalls.h:55: error: ';' expected (got "cacos")
make[1]: *** [Makefile:17: box.o] Fehler 1

I can build its own distribution of the library, but TCC errors out with

make[4]: Verzeichnis „/home/fernando/Builds/ecl-lisp/ecl/build/atomic/src“ wird betreten
source='/home/fernando/Builds/ecl-lisp/ecl/src/bdwgc/libatomic_ops/src/atomic_ops.c' object='atomic_ops.lo' libtool=yes \
DEPDIR=.deps depmode=tcc /bin/sh /home/fernando/Builds/ecl-lisp/ecl/src/bdwgc/libatomic_ops/depcomp \
/bin/sh ../libtool  --tag=CC   --mode=compile tcc         -fPIC -DHAVE_CONFIG_H   -I../src -I/home/fernando/Builds/ecl-lisp/ecl/src/bdwgc/libatomic_ops/src  -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -g -fPIC -D_THREAD_SAFE  -c -o atomic_ops.lo /home/fernando/Builds/ecl-lisp/ecl/src/bdwgc/libatomic_ops/src/atomic_ops.c
libtool: compile:  tcc -fPIC -DHAVE_CONFIG_H -I../src -I/home/fernando/Builds/ecl-lisp/ecl/src/bdwgc/libatomic_ops/src -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -g -fPIC -D_THREAD_SAFE -c /home/fernando/Builds/ecl-lisp/ecl/src/bdwgc/libatomic_ops/src/atomic_ops.c -MD -MF .deps/atomic_ops.TPlo  -fPIC -DPIC -o atomic_ops.o
/home/fernando/Builds/ecl-lisp/ecl/src/bdwgc/libatomic_ops/src/atomic_ops.c:104: error: ';' expected (got "AO_locks")
make[4]: *** [Makefile:612: atomic_ops.lo] Fehler 1

Could easily be taken out


Build system included as part of the source code.

~/Builds/jim-tcl/jimtcl/autosetup> cloc .
      19 text files.
      13 unique files.                              
       6 files ignored. v 1.92  T=0.59 s (22.0 files/s, 51834.1 lines/s)
Language                     files          blank        comment           code
C                                1           3959           3192          15358
Bourne Shell                     4            380           1012           4722
Tcl/Tk                           8            169            605           1184
SUM:                            13           4508           4809          21264

Chibi has a List of supported modules. It has standard SRFIs and Chibi specific ones.


Output from cloc. Cloned from git early may 2022.

cloc . --exclude-dir=benchmarks,build-lib,contrib,data,js,examples,doc,tests,tools
     594 text files.
     561 unique files.                                          
      39 files ignored. v 1.92  T=1.00 s (560.0 files/s, 106811.8 lines/s)
Language                      files          blank        comment           code
Scheme                          494           8187           7951          58099
C                                46           1806            653          24629
C/C++ Header                     11            540            373           3357
make                              1             86             21            427
CMake                             1            113             65            424
Markdown                          3             48              0            104
YAML                              3              9              0             71
Bourne Again Shell                1              2              2             26
Bourne Shell                      1              1              0              4
SUM:                            561          10792           9065          87141

If Chibi is being compiled staticly, it needs the `clibs.c` file (which can be generated via `make clibs.c`). This file translates all the hand-written Scheme libraries to C so that it can be compiled statictly using `chibi-ffi`, which is a handwritten utility. If no library support is needed, then this is not required.


Compiled by building first make clibs.c with the local Chibi installation and then compiling with make -B chibi-scheme-static SEXP_USE_DL=0 CFLAGS="-DSEXP_USE_STATIC_LIBS -DSEXP_USE_STATIC_LIBS_NO_INCLUDE=0 -Os -g0". Adding -march=rv32imafd generates a binary of the same size. Executing the static version requires passing the -q flag, for example: CHIBI_IGNORE_SYSTEM_PATH=1 CHIBI_MODULE_PATH=lib ./chibi-scheme-static -q tests/r7rs-tests.scm


Chicken maintains a somewhat outdated (as of <2022-05-15 So>) list of supported SRFIs.


Output from cloc. Version 5.3.0. It includes the pregenerated C files for the bootstrap. This means that the handwritten Scheme files and their translation to C are counted. This may seem unfair, but the Scheme files are written by humans, and therefore count, and the C transpilation is needed by the compiler.

cloc . --exclude-dir=manual-html,tests,scripts
     244 text files.
     208 unique files.                                          
      41 files ignored. v 1.92  T=4.20 s (49.5 files/s, 178924.0 lines/s)
Language                         files          blank        comment           code
C                                   90          25984          92662         577108
Scheme                             109           4697           4309          41229
C/C++ Header                         1            472            188           2930
Tcl/Tk                               1            419             60           1446
Bourne Shell                         2              7             32             41
make                                 2              5             29             27
R                                    1              3              0             10
DOS Batch                            1              0              0              2
Windows Resource File                1              1              1              1
SUM:                               208          31588          97281         622794

Some files need to be generated by a previous version. See the Bootstrapping section from the README.


Compiled dynamicly, chicken executable, the csi executable weights 183 KB. In order to cross-compile Chicken, we follow this guide.


The documentation entry is quite outdated as of <2022-05-15 So>. However, Gambit has support for a nice number of SRFIs and can use package managers as documented in the link of the previous sentence.


Output from cloc. Version 4.9.4. It includes the pregenerated C files for the bootstrap. This means that the handwritten Scheme files and their translation to C are counted. This may seem unfair, but the Scheme files are written by humans, and therefore count, and the C transpilation is needed by the compiler.

cloc . --exclude-dir=bench,bin,contrib,doc,examples,githooks,misc,prebuilt,tests
     739 text files.
     707 unique files.                                          
      51 files ignored. v 1.92  T=11.10 s (63.7 files/s, 166709.0 lines/s)
Language                     files          blank        comment           code
C                               69          22583           3802        1464490
Scheme                         484          34913          18820         231427
Bourne Shell                    10           2927           2172          17574
C/C++ Header                    33           3500           1407          15329
Pascal                           2              2          10432           9184
m4                               1            767              0           3063
make                            83            921            123           2984
C++                             11            319            206           1733
Qt                               5              1              0           1608
YAML                             2             56             21            217
Smalltalk                        1             27             25            194
Markdown                         2             48              0             64
JavaScript                       3             21              6             39
Dockerfile                       1              0              0              6
SUM:                           707          66085          37014        1747912

See make bootstrap.

cloc . --exclude-dir=docs,bench  --fullpath --not-match-d="/*prebuilt" --exclude-lang=OCaml,Scala,Haskell,Rust,Idris,JavaScript,Java,Python,Go
     114 text files.
      88 unique files.                              
      37 files ignored. v 1.92  T=0.12 s (681.6 files/s, 76586.0 lines/s)
Language                      files          blank        comment           code
Scheme                           44           1028            898           4460
Bourne Shell                     10             71             33            724
C                                 1            136             37            649
Lua                               1             42             24            284
make                             16             35             14            275
Markdown                          2             46              0             95
HTML                              1              0              0             10
JSON                              1              0              0              6
CMake                             1              2              0              4
Bourne Again Shell                1              0              0              2
Ruby                              1              0              0              2
SUM:                             79           1360           1006           6511

S7 by default is a small language. However, it does support some of the more important extensions and it could use some external SRFIs to expand its library.


Output from cloc. Core implementation is s7.c s7.h. Cloned from git early may 2022.

cloc s7.c s7.h 
       2 text files.
       2 unique files.                              
       0 files ignored. v 1.92  T=0.85 s (2.4 files/s, 113773.1 lines/s)
Language                     files          blank        comment           code
C                                1           8990           3625          82605
C/C++ Header                     1            137            584            509
SUM:                             2           9127           4209          83114
cloc *.scm
      23 text files.
      23 unique files.                              
       0 files ignored. v 1.92  T=1.14 s (20.2 files/s, 130341.3 lines/s)
Language                     files          blank        comment           code
Scheme                          23          12549           5078         131062
SUM:                            23          12549           5078         131062

REPL binary compiled with GCC for RISC-V, dynamic linking to LibC.


Compiling staticly does not work out of the box. It needs to then run repl libc.scm which generates a libc_s7.c file and tries compiling it to a file which it then loads. However, in a embedded RISC-V we do not have a working C compiler… Compiling it dynamicly does not seem to work out of the box either. Need to ask the authors.


Version 0.3.1

cloc . --exclude-dir=tests,examples
      14 text files.
       8 unique files.                              
       8 files ignored. v 1.92  T=0.19 s (41.4 files/s, 97154.8 lines/s)
Language                     files          blank        comment           code
C                                1           1474           1975          11819
Scheme                           5            272            606           1027
C/C++ Header                     1            124            659            711
make                             1             26              2             89
SUM:                             8           1896           3242          13646

Compiled with -Os -g0 -static and stripped.

 cloc .
      73 text files.
      70 unique files.                              
      42 files ignored. v 1.92  T=0.32 s (218.0 files/s, 134655.6 lines/s)
Language                     files          blank        comment           code
C                               34           3259           3769          17327
HTML                             3           3949             11           9013
C/C++ Header                    28           1354           1492           2534
make                             2             65             38            225
CSS                              3             34              0            169
SUM:                            70           8661           5310          29268

Compiled with CFLAGS="-Os -static -fPIC" and stripped.


This includes some modules that could be taken out.

cloc . --exclude-dir=example.api,example.ext,freebsd,examples,sqlite3,tests,tools,jsmn,autosetup
     113 text files.
      86 unique files.                              
      28 files ignored. v 1.92  T=0.52 s (165.1 files/s, 102332.6 lines/s)
Language                             files          blank        comment           code
C                                       44           3965           5545          26287
HTML                                     1            108              0           9263
Tcl/Tk                                  19            330            554           2321
C++                                      1            443            162           1671
C/C++ Header                            10            233            586            930
Windows Module Definition                1             60              0            570
Bourne Shell                             4             19             54             97
IDL                                      1              0              0             34
YAML                                     2              0              0             28
XML                                      1              0              0             11
make                                     1              8             10             11
m4                                       1              0              0              3
SUM:                                    86           5166           6911          41226

Compiled with CC=riscv32-buildroot-linux-gnu-gcc CFLAGS="-static -Os -g0" ./configure --utf8 --math --disable-lineedit. It can be made smaller if modules are disabled and if it is stripped.


The results are great. And some errors come because of dynamic modules, which will always fail with this system.

root@buildroot:/mnt/jimtcl# LD_LIBRARY_PATH="/mnt/jimtcl:$(LD_LIBRARY_PATH)" ./jimsh "/mnt/jimtcl/tests/runall.tcl"
          Totals: Total  5462   Passed  5276  Skipped   176  Failed    11

Date: 2022-04-30 Sa 00:00

Author: Fernando Oleo Blanco

Email: irvise _at_

Created: 2022-08-04 Do 21:16

Emacs 27.1 (Org mode 9.4.4)