R7RS/R6RS Scheme implementation in Rust using CPS & JIT compilation
- Rust 49.7%
- Scheme 49.1%
- Makefile 0.5%
- Python 0.4%
- C 0.3%
| .cargo | ||
| .forgejo/workflows | ||
| .github/workflows | ||
| .vscode | ||
| asmgen | ||
| bin | ||
| c | ||
| capy | ||
| capy-bytecode | ||
| capy-derive | ||
| docs | ||
| lib | ||
| tests | ||
| .DS_Store | ||
| .git-blame-ignore-revs | ||
| .gitignore | ||
| .gitmodules | ||
| Cargo.lock | ||
| Cargo.toml | ||
| CHANGELOG.md | ||
| cliff.toml | ||
| INSTALLATION.md | ||
| LICENSE | ||
| Makefile | ||
| README.md | ||
| rust-toolchain.toml | ||
| TODO.md | ||
CapyScheme
R6RS/R7RS compiler and runtime written in Rust.
Goals
- Continuation-Passing Style compiler based on Compiling with Continuations, Continued together with JIT compiler utilizing Cranelift to emit native code in CPS style.
- 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 auto-complete, debugger, disassembler etc.
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 99.3% of tests are passing.
To run tests yourself:
$ capy -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.