Library / SDK
mighty-gerbils/gerbil avatar
mighty-gerbils/gerbil

Gerbil is an opinionated Scheme for systems programming

Gerbil Scheme public release mirror; development happens at https://gerbil.cons.io

1,269 stars120 forksSchemeLGPL-2.1

At a glance

What is it?
Gerbil is a Scheme dialect built for systems programming on top of the Gambit runtime and compiler, with a quote-syntax macro system, a native implementation of syntax-case, a module system where modules are single instantiation, and an ahead of time compilation story. The trade is that the dialect is deliberately opinionated; the README likens it to the C++ to Marc Feeley's C.
Who is it for?
Gerbil fits a Schemer who wants a language with real compilation and a macro system with the full meta-syntactic tower, and who is willing to accept a dialect that is opinionated about how that is done, because the single instantiation module design is what makes ahead of time compilation and compiled macros possible. It does not fit a team that wants portable Scheme code that runs on any implementation, since the dialect is deliberately not Racket and not portable Scheme.
Can I use it commercially?
Yes, with conditions. LGPL-2.1 is a weak copyleft licence: you can use it inside commercial and closed-source software, but if you distribute changes to its own files, you must publish those changes under the same licence.
Is it still maintained?
Yes. The repository last received commits 108 days ago.
What is it written in?
Mainly Scheme, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 7, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • mighty-gerbils/gerbil1,269 ★ · -1
Star history
Repository2026-10-212026-11-07
mighty-gerbils/gerbil1.3k1.3k

-1 Stars in the last 17 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

A dialect with a point of view

The README opens by calling Gerbil an opinionated, and it says some might even say tendentious, dialect of Scheme designed for systems programming. That framing is the most useful thing in the documentation, because it tells you what kind of project this is. Gerbil provides a state of the art macro and module system on top of the Gambit runtime and compiler, and an extensive standard library. The comparison the author offers is that one way to think of Gerbil is as the C++ to Marc Feeley's C, which is a deliberately provocative way of saying that Gerbil is a layer of opinionated tooling and syntax over a portable, fast, low-level Scheme kernel. The epilogue explains why that kernel was chosen, because the original author based the canonical version of Gerbil on Gambit as the most portable, performant and low-level Scheme kernel available, after having built other backends over the years.

Quote-syntax and a native syntax-case

The macro system is the part of Gerbil that is most unlike plain Scheme, and it is built on quote-syntax. Quote-syntax is the notation that lets you write macros that read like a pattern language, and it provides the full meta-syntactic tower with a native implementation of syntax-case. The phrase full meta-syntactic tower means the whole family of hygienic macro techniques is available rather than a subset, and the native implementation of syntax-case matters because syntax-case is the primitive that the others are built on. Where a plain Scheme requires a library for pattern matching in macros, Gerbil provides it in the language. The README suggests that if you are interested in Gerbil macrology, the place to start is the core prelude, since that is the language you get in the interpreter and the one available when writing a new module without explicitly specifying a prelude.

Modules are single instantiation

Gerbil also provides a full-blown module system, similar to PLT Scheme's, with the parenthetical that it is of course Racket's now. The stated main difference from Racket is that Gerbil modules are single instantiation, which supports high performance ahead of time compilation and compiled macros. That is the design decision with the widest consequences, and it is the reason the dialect is opinionated. A single instantiation module is instantiated once per program rather than once per client, so the module state is global, so it can be compiled to native code once, and so a macro defined in a module can be compiled into the code that uses it. The price is that a module cannot be instantiated twice with different parameters.

Building from source on Linux

Installation from source is what the README treats as the primary path on Linux, and it is a standard configure and make cycle:

shell
$ git clone [email protected]:mighty-gerbils/gerbil.git
$ cd gerbil
$ ./configure
$ make -j4
$ sudo make install

That installs Gerbil in /opt/gerbil, and the only remaining step is adding /opt/gerbil/bin to your path. The install prefix can be changed with the --prefix configure option if you do not want it in the default location. The default configuration pulls in a few dependencies you may need to install yourself, namely sqlite, zlib and libcrypto or openssl, and on Ubuntu they are installed with:

shell
$ sudo apt install libssl-dev zlib1g-dev libsqlite3-dev

If you want the latest release rather than the tip of the branch, the v0.18 release page carries precompiled binary packages for Ubuntu, Debian, Fedora and CentOS. The Makefile in the repository is a thin wrapper, since the build target calls the build script with the make flags passed through, the install target calls the install script with a DESTDIR, and the check target runs the test suite through the build script in the gxtest environment.

macOS has a Homebrew formula

On macOS the path is shorter, because the project maintains its own Homebrew tap. The install is one command:

shell
$ brew install mighty-gerbils/gerbil/gerbil-scheme

The formula lives in a separate repository, the homebrew-gerbil one, so the tap and the source are versioned independently. The more detailed instructions live in the installation guide on the project site, which is where the README sends anyone who wants more than the quickstart. The documentation itself is hosted at cons.io and described as a work in progress, with an introduction for seasoned Schemers, a getting started page for setting up an installation and writing a first program, a set of hands-on tutorials, and the reference documentation for the runtime and the standard library.

gxi, gxc, and reading the implementation

The Gerbil interpreter is gxi and the compiler is gxc, and running gxi directly gives you an interactive Gerbil shell. The README makes a distinctive recommendation about how to learn the language. Probably the best way to dive into Gerbil is by reading the sources, as all the main language features are exercised in one way or another within the implementation. It then offers several starting points depending on your interest, with the standard library sources for general purpose programming, the core prelude for macrology, and the expander sources and the compiler sources for the internals of each. The documentation can also be built locally by running doc/build.sh, which leaves the HTML output in doc/.vuepress/dist, and the script uses vuepress so npm has to be installed. Support is on Gitter in the gerbil-scheme channel.

Licensing is more complicated than the badge

The licence needs reading carefully because it is layered. The source code is distributed with the Gambit license, which means that Gerbil on Gambit is dual licensed under LGPLv2.1 and Apache 2.0, and the copyright line covers Dimitris Vyzovitis and contributors from 2007 to 2023. Two implementations are exceptions, since the srfi 115 and srfi 159 implementations come from Chibi as the only available reference implementations, and they are copyright Alex Shinn under a BSD-style licence. The logo is separate again, copyright Brad Christensen from 2019, and provided under a royalty-free non-exclusive licence for use in the context of the language, with derivatives encouraged to be offered back for inclusion. The licence field in the project listing records LGPL-2.1. The release history is short and slow, with v0.18.2 named Fianchetto published on 2026-04-03, v0.18.1 on 2023-12-06 and v0.18 on 2023-10-12, and the last push to the repository on 2026-07-22, so the code moves more often than the tags do.

Editorial conclusion

Gerbil fits a Schemer who wants a language with real compilation and a macro system with the full meta-syntactic tower, and who is willing to accept a dialect that is opinionated about how that is done, because the single instantiation module design is what makes ahead of time compilation and compiled macros possible. It does not fit a team that wants portable Scheme code that runs on any implementation, since the dialect is deliberately not Racket and not portable Scheme. It does not fit someone who wants a new language to learn from scratch without reading a compiler, because the README itself says the best way to dive in is to read the sources. Before you build on it, read the installation guide and the introduction, then look at the core prelude to see the language you are actually getting, and check the release state, where v0.18.2 named Fianchetto was published on 2026-04-03 after a long gap back to v0.18 in October 2023.

Frequently asked questions

What is Gerbil Scheme?

It is an opinionated dialect of Scheme designed for systems programming, providing a macro and module system on top of the Gambit runtime and compiler along with an extensive standard library. The README compares it to C++ as a layer over Marc Feeley's C.

How do I install Gerbil on Linux?

Clone the repository, run ./configure, make -j4 and sudo make install, which installs it under /opt/gerbil so you add /opt/gerbil/bin to your path. You need sqlite, zlib and openssl development packages, and the v0.18 release page has prebuilt packages for Ubuntu, Debian, Fedora and CentOS.

How does the Gerbil module system differ from Racket?

Gerbil modules are single instantiation, which supports high performance ahead of time compilation and compiled macros. The rest of the module system is similar to the PLT Scheme and Racket one.

What are the gxi and gxc commands?

gxi is the Gerbil interpreter, which you can run directly for an interactive shell, and gxc is the compiler. The documentation guide on the project site covers the hello world example and the rest of the introduction.

Is Gerbil still updated?

The repository is not archived and the last push was on 2026-07-22, with v0.18.2 named Fianchetto published on 2026-04-03 after v0.18.1 from December 2023 and v0.18 from October 2023. The source is dual licensed under LGPLv2.1 and Apache 2.0.

Official sources

  1. License: LGPL-2.1
  2. mighty-gerbils/gerbil on GitHub
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/mighty-gerbils-gerbil.svg)](https://hysenlabs.com/projects/mighty-gerbils-gerbil)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/mighty-gerbils-gerbil.svg)](https://hysenlabs.com/projects/mighty-gerbils-gerbil)

Was this useful?