Chibi-Scheme is a small Scheme implementation packaged as a library for embedding and scripting inside C programs. It offers a full numeric tower, Unicode, and hygienic macros with few external dependencies.
Overview
Chibi-Scheme is a compact Scheme library intended as an extension and scripting language for C applications. Lightweight VM-based threads are supported, and each VM runs in an isolated heap so multiple VMs can run in parallel on different OS threads.
Default builds include a full numeric tower with rational and complex numbers, Unicode throughout, low- and high-level hygienic macros, and an extensible module system. The default REPL language includes R7RS small bindings, exposed as the (scheme small) library, and the language can be trimmed at compile or startup time.
Installing produces a shared libchibi-scheme library and a sample command-line REPL. Documentation is available via generated HTML from the manual. An emscripten build target is documented for JavaScript output.
The project is reported to run on Linux, BSD variants, macOS, Plan 9, Windows, iOS, Android, ARM, and Emscripten, with notes for native Windows desktop builds.
Key features
- Embeddable C library with no required deps
- Isolated heap per VM
- R7RS small language layer
- Hygienic macro system
- Full numeric tower and Unicode
- Extensible modules
- Configurable reduced language builds
- Sample command-line REPL
Use cases
- Scripting inside C applications
- Embedding a small Scheme runtime
- Running multiple Scheme VMs in threads
- Interactive Scheme experimentation