Skip to content

ashinn/chibi-scheme

Folders and files

NameName
Last commit message
Last commit date

Latest commit

af1bc58 · Apr 1, 2025
Jul 29, 2020
May 27, 2020
May 11, 2020
Jun 3, 2020
Jul 21, 2021
Apr 8, 2015
Apr 1, 2025
Jan 30, 2024
Jan 30, 2025
Nov 25, 2018
Apr 1, 2025
Mar 29, 2016
Nov 1, 2024
May 31, 2024
Apr 20, 2023
Feb 22, 2015
Jun 24, 2016
May 31, 2024
Sep 11, 2022
Jun 30, 2021
Jul 19, 2021
May 31, 2024
May 16, 2024
Aug 8, 2022
Jun 20, 2018
Jan 25, 2015
Dec 24, 2024
May 31, 2024
Apr 2, 2018
May 31, 2024
Jun 20, 2018
May 29, 2024
Jan 25, 2015
Jun 24, 2016
Jan 30, 2025
Jan 25, 2015
Jan 9, 2022
Jul 30, 2020
May 29, 2024
Feb 21, 2021
Oct 4, 2022
Apr 8, 2015
Jan 30, 2025
Apr 8, 2015
Jan 30, 2025

Repository files navigation

Chibi-Scheme

Minimal Scheme Implementation for use as an Extension Language

https://github.com/ashinn/chibi-scheme

Chibi-Scheme is a very small library intended for use as an extension and scripting language in C programs. In addition to support for lightweight VM-based threads, each VM itself runs in an isolated heap allowing multiple VMs to run simultaneously in different OS threads.

There are no external dependencies so is relatively easy to drop into any project.

Despite the small size, Chibi-Scheme attempts to do The Right Thing. The default settings include:

  • a full numeric tower, with rational and complex numbers
  • full and seamless Unicode support
  • low-level and high-level hygienic macros
  • an extensible module system

Specifically, the default repl language contains all bindings from R7RS small, available explicitly as the (scheme small) library. The language is built in layers, however - see the manual for instructions on compiling with fewer features or requesting a smaller language on startup.

Chibi-Scheme is known to work on 32 and 64-bit Linux, FreeBSD, NetBSD, OpenBSD, DragonFlyBSD, OS X, Plan 9, Windows, iOS, Android, ARM and Emscripten. Basic support for native Windows desktop also exists. See README-win32.md for details and build instructions.

To build on most platforms just run make && make test. This has a few conditionals assuming GNU make. If using another make, there are a few parameters in Makefile.detect you need to set by hand.

This will provide a shared library libchibi-scheme, as well as a sample chibi-scheme command-line repl. You can then run

sudo make install

to install the binaries and libraries. You can optionally specify a PREFIX for the installation directory:

make PREFIX=/path/to/install/
sudo make PREFIX=/path/to/install/ install

By default files are installed in /usr/local.

If you want to try out chibi-scheme without installing, be sure to set LD_LIBRARY_PATH (DYLD_LIBRARY_PATH on macOS) so it can find the shared libraries.

To make the emscripten build run make js (not emmake make js).

For more detailed documentation, run make doc and see the generated doc/chibi.html or read the manual online.