R7RS/R6RS Scheme implementation in Rust using CPS & JIT compilation
  • Rust 53.7%
  • Scheme 44%
  • Tree-sitter Query 1.2%
  • Python 0.4%
  • Makefile 0.4%
  • Other 0.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
playXE cce1263a30
Some checks failed
CI / Tests (push) Has been cancelled
Update README.md
2026-10-20 06:55:06 +02:00
.cargo fix build 2026-07-05 06:58:24 +07:00
.forgejo/workflows ci: add musl portable release build 2026-07-05 06:58:39 +07:00
.github/workflows ci: actualize github CI 2026-07-28 18:28:10 +07:00
.vscode feat(resolve-free-vars): implement free variable resolution in tree-il compiler 2026-07-05 06:58:36 +07:00
benchmarks feat: add r7rs benchmark suite and improve SBBV 2026-07-15 22:25:24 +07:00
c feat: Scheme Native Interface + Precise GC 2026-07-28 18:26:09 +07:00
crates fix: make build work on macOS 2026-10-01 21:01:38 +07:00
docs refactor: rework flags for dumping, and add proper flag parser 2026-08-24 06:29:50 +07:00
examples feat(class): add runtime object system 2026-07-05 06:58:38 +07:00
lib feat: (srfi 64 testing) 2026-09-09 08:12:51 +07:00
tests refactor: rewrite port system from scratch 2026-08-06 08:13:48 +07:00
.git-blame-ignore-revs ignore fmt commit 2026-07-28 19:59:08 +07:00
.gitignore fix: do not use std::env::var to check if SBBV dump is needed 2026-08-03 22:34:32 +07:00
.gitmodules feat: add r7rs benchmark suite and improve SBBV 2026-07-15 22:25:24 +07:00
Cargo.lock fix: make build work on macOS 2026-10-01 21:01:38 +07:00
Cargo.toml feat: Scheme Native Interface + Precise GC 2026-07-28 18:26:09 +07:00
CHANGELOG.md chore: update CHANGELOG.md [skip ci] 2026-09-03 00:02:39 +00:00
cliff.toml fix(ci): do not include [skip ci] into changelog 2026-07-05 06:58:33 +07:00
INSTALLATION.md docs: actualize docs 2026-07-08 19:53:52 +07:00
LICENSE Change license from GPLv3 to LGPLv3 2026-07-05 06:58:29 +07:00
Makefile fix: make build work on macOS 2026-10-01 21:01:38 +07:00
README.md Update README.md 2026-10-20 06:55:06 +02:00
rust-toolchain.toml CI job 2026-07-05 06:58:28 +07:00
TODO.md more tests 2026-07-05 06:58:23 +07:00

MOVED BACK TO GITHUB

CapyScheme is now again on GitHub at https://github.com/playX18/capyscheme

CapyScheme

R6RS/R7RS compiler and runtime written in Rust.

Capy 2.0.0 REPL preview

Capy 2.0.0

Capy 2.0.0 is a large compiler, runtime, and library release.

  • Compiler work now centers on the SSA pipeline, SSA lowering, and FASL code artifacts.
  • Runtime work includes FFI callbacks, native extension loading, thread interrupts, yieldpoints, conservative stack scanning, UTF-8 API helpers, and improved source/error handling.
  • GC work includes configurable trigger policies, adaptive/compact/aggressive heuristics, benchmarks, cache locking, and alignment fixes.
  • The object system now has define-class, define-generic, define-method, next-method dispatch, sealed/locked generics, class redefinition, slot helpers, and runtime class/generic descriptors.
  • Language and library additions include implicit #%app, define-property, call-in-continuation, terminal support, SRFI-213, and SRFI-64 comparator support.
  • The fancy REPL, test runner, package builds, and CI/release automation also received updates for this release.

Goals

  • Continuation-Passing Style compiler based on Compiling with Continuations, Continued, with native-code generation and FASL compilation.
  • Runtime with support for loading modules, native extensions, and fast GC.
  • User-friendly: develop standard library and set of utilities to make using Scheme easier.
  • Interactive: Provide a REPL with completion, syntax rendering, bracket matching, and reader diagnostics.

R6RS/R7RS support

Most of R6RS and R7RS-small should be "just working" apart from some bugs. R6RS test-suite from racket/r6rs is used to guide development and at the moment 100% of tests are passing.

To run tests yourself:

$ capy --r6rs -L . -s tests/r6rs/run-via-eval.sps

Thanks

Big thanks to authors of Loko, Larceny, Guile and Ypsilon. CapyScheme uses stdlib parts from all of them and takes inspiration from them.