3
10
Fork
You've already forked capy
0
R7RS/R6RS Scheme implementation in Rust using CPS & JIT compilation
  • Rust 51%
  • Scheme 46.9%
  • Tree-sitter Query 1.3%
  • Makefile 0.4%
  • Python 0.3%
  • Other 0.1%
2026年07月14日 00:02:57 +00:00
.cargo fix build 2026年07月05日 06:58:24 +07:00
.codegraph fix(sbbv): preserve rest lists and optimize Rest* under SBBV 2026年07月11日 11:17:26 +07:00
.forgejo/workflows ci: add musl portable release build 2026年07月05日 06:58:39 +07:00
.github/workflows feat(runtime): start work on interpreter 2026年07月05日 06:58:34 +07:00
.vscode feat(resolve-free-vars): implement free variable resolution in tree-il compiler 2026年07月05日 06:58:36 +07:00
benchmarks chore: remove nobacktrace directive from source code 2026年07月11日 09:16:24 +07:00
bin get rid of lsp 2026年07月05日 06:58:37 +07:00
capy fix(sbbv): propagate type facts through not 2026年07月13日 11:23:59 +07:00
capy-derive chore(clippy): remove lint suppressions 2026年07月05日 06:58:38 +07:00
docs docs: actualize docs 2026年07月08日 19:53:52 +07:00
examples feat(class): add runtime object system 2026年07月05日 06:58:38 +07:00
lib fix(sbbv): preserve rest lists and optimize Rest* under SBBV 2026年07月11日 11:17:26 +07:00
tests fix(sbbv): preserve rest lists and optimize Rest* under SBBV 2026年07月11日 11:17:26 +07:00
.DS_Store comment out failed tests for now 2026年07月05日 06:58:33 +07:00
.git-blame-ignore-revs chore: add fmt commit to git-blame-ignore-vars 2026年07月05日 06:58:32 +07:00
.gitignore get rid of lsp 2026年07月05日 06:58:37 +07:00
.gitmodules remove nanopass submodule 2026年07月05日 06:58:29 +07:00
Cargo.lock feat: better debugging 2026年07月08日 14:47:59 +07:00
Cargo.toml feat: better debugging 2026年07月08日 14:47:59 +07:00
CHANGELOG.md chore: update CHANGELOG.md [skip ci] 2026年07月14日 00:02:57 +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(sbbv): propagate type facts through not 2026年07月13日 11:23:59 +07:00
README.md chore: update README 2026年07月11日 11:48:01 +07: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

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 Larceny, Guile and Ypsilon. CapyScheme uses stdlib parts from all of them and takes inspiration from them.