Skip to content

heyjuvi/scheme-compiler

Repository files navigation

Slang is a (far from feature-complete) scheme to llvm ir compiler.

Building

To build everything and run all tests, run the following:

meson build
./build_all.sh

You need to have the chicken scheme compiler installed to bootstrap slang.

Examples

To run an example (or your own code), simply use this command:

./test_slang.sh examples/romans.scm ./build/self_hosted.elf example

Features

  • Basic primitive such as pair, list, string, char, vector etc.
  • Basic constructs such as let, let*, cond, if, set!, begin etc. (letrec and set-car!/set-cdr! are still missing)
  • Some of the primitive functions, most importantly display and equal? and things like that
  • Basic I/O primitives (at the moment only reading files is possible and only read-char and eof-object? are supported)
  • Tail recursion to loop conversion
  • Continuations with call/cc
  • Foreign calls
  • Garbage collection
  • Dynamic heap allocation

About

A llvm scheme compiler

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published