R7RS Scheme, brewed in Zig

Write the lambda. Run on the metal.

A complete R7RS-small Scheme implemented in Zig. Compile to native binaries via LLVM on AArch64 and x86_64 — so the source stays elegant and the machine stays busy.

curl -fsSL https://kaappi-lang.org/install.sh | bash
600+ procedures 178 SRFIs first-class call/cc C FFI OS threads web · databases · email · crypto
The full pour

Everything R7RS asks for, and the parts that make it fun.

Every identifier from Appendix A is implemented — then continuations, a native compiler, and an FFI on top.

conformance

Complete R7RS-small

600+ built-in procedures, 32 syntax forms, all 16 standard libraries — every identifier from Appendix A.

control

First-class continuations

Multi-shot call/cc via stack copying, plus dynamic-wind and call/ec for escapes.

speed

Compile to native code

Compile Scheme to native binaries via LLVM on AArch64 and x86_64 — closures, tail calls, and fixnum arithmetic run at full speed.

batteries

178 SRFIs

Lists, strings, hash tables, vectors, threads, formatting, char-sets — 12 built in, 162 portable.

interop

C FFI with callbacks

Call shared libraries from Scheme, and pass Scheme procedures where C expects a function pointer.

concurrency

OS threads & fibers

Real OS threads via SRFI-18, plus green fibers with channels. Pre-fork and threaded HTTP servers.

Taste it

Small forms, full language.

Run these yourself in the browser playground — no install needed.

recursion
(define (fib n)
  (if (< n 2) n
      (+ (fib (- n 1))
         (fib (- n 2)))))

(fib 30)  ;=> 832040
hygienic macros
(define-syntax my-when
  (syntax-rules ()
    ((_ test body ...)
     (if test
         (begin body ...)))))

(my-when #t
  (display "hello"))
libraries
(define-library (math)
  (export square cube)
  (import (scheme base))
  (begin
    (define (square x)
      (* x x))
    (define (cube x)
      (* x x x))))
Kaappi: A Scheme Programming Language — the paperback, seen at an angle
The slow brew

Scheme will change how you think about code.

Written for programmers who already know Python, JavaScript or Ruby and nothing about Lisp. It starts at the REPL prompt and builds one runnable example at a time, with exercises at the end of every chapter.

first edition, 2026 337 pages paperback in 9 countries
PART I
Getting Started

Install it, meet the REPL, run your first program.

3 chapters
PART II
The Language

Data types, lists, control flow, functions, bindings, higher-order functions, I/O.

7 chapters
PART III
Going Further

Macros, libraries, records, error handling, continuations.

5 chapters
PART IV
Beyond R7RS

The SRFI library, the C FFI, concurrency.

3 chapters
Watch

Learn Kaappi on video.

Short, one idea at a time, and every line of code on screen is real output from the Kaappi binary. More at @KaappiScheme.

Read on

Documentation

Brew a REPL and start evaluating.

Or try it in the browser first.