Yunoinsky/chez-raylib

Raylib binding for Chez Scheme, with an automatic generator

22

stars

86

commits

Scheme

primary language

Jul 7, 2026

updated

README

#+TITLE: Chez-Raylib λ-0.3
#+AUTHOR: Yunoinsky Chen

** Introduction

Raylib bindings for Chez Scheme. Auto-generated from rlparser sexpr sources
via a small binding generator (~raylib_binding_generator.ss~); no XML or
external parser dependencies.

Inspired by [[https://github.com/petelliott/raylib-guile][raylib-guile]] — thanks Petelliott.
Thanks [[https://github.com/raysan5/raylib][Raysan]] for raylib.

λ-0.3 was developed with LLM assistance (DeepSeek V4 + Pi-agent); λ-0.2 was not.

** What's included

| Library             | Status         | Description                                      |
|---------------------+----------------+--------------------------------------------------|
| ~(raylib raylib)~    | auto-generated | raylib.h API — lazy foreign-procedure resolution |
| ~(raylib rlgl)~     | auto-generated | rlgl immediate-mode layer                        |
| ~(raylib raymath)~  | hand-written   | matrix wrapper around ~(chez-raylib matrix)~     |
| ~(chez-raylib matrix)~ | hand-written | Chez-idiomatic flat-vector matrix library        |

Auto-generated files are safe to delete and regenerate.

** Quick start

1. Install libraylib (~brew install raylib~ or build from source).
2. Put ~libraylib.dylib~ (or ~.so~ / ~.dll~) into ~/Library/chezscheme/raylib/~.
3. Build: ~scheme --script src/raylib_binding_generator.ss~
4. Compile the four ~.sls~ files under ~src/~, then copy ~.sls~ + ~.so~ into
   ~/Library/chezscheme/raylib/~. (See [[./docs/BUILD.org][BUILD.org]] for exact commands.)
5. Run a test: ~scheme --script test/core/core_basic_window.ss~

Tests (41 total): ~core/ (14)~, ~textures/ (7)~, ~shapes/ (4)~, ~text/ (4)~,
~models/ (8)~, ~audio/ (4)~.

** Requirements

- Chez Scheme ≥ 9.5.8 (tested with Chez 10.5.0-pre-release).
- raylib ≥ 6.1 (dynamic library, statically includes rlgl).

** See also

- [[./docs/GENERATOR.org][GENERATOR.org]] — how the binding generator works, sexpr source format
- [[./docs/CONVENTIONS.org][CONVENTIONS.org]] — naming, struct-return, ftype vs record types
- [[./src/raylib_binding_generator.ss][raylib_binding_generator.ss]] — the generator itself

Not written in Markdown, so it's shown here as plain text — view it formatted on GitHub.

Contributors

Yunoinsky

86 commits

Yunoinsky/chez-raylib

Raylib binding for Chez Scheme, with an automatic generator

22

stars

86

commits

Scheme

primary language

Jul 7, 2026

updated

README

#+TITLE: Chez-Raylib λ-0.3
#+AUTHOR: Yunoinsky Chen

** Introduction

Raylib bindings for Chez Scheme. Auto-generated from rlparser sexpr sources
via a small binding generator (~raylib_binding_generator.ss~); no XML or
external parser dependencies.

Inspired by [[https://github.com/petelliott/raylib-guile][raylib-guile]] — thanks Petelliott.
Thanks [[https://github.com/raysan5/raylib][Raysan]] for raylib.

λ-0.3 was developed with LLM assistance (DeepSeek V4 + Pi-agent); λ-0.2 was not.

** What's included

| Library             | Status         | Description                                      |
|---------------------+----------------+--------------------------------------------------|
| ~(raylib raylib)~    | auto-generated | raylib.h API — lazy foreign-procedure resolution |
| ~(raylib rlgl)~     | auto-generated | rlgl immediate-mode layer                        |
| ~(raylib raymath)~  | hand-written   | matrix wrapper around ~(chez-raylib matrix)~     |
| ~(chez-raylib matrix)~ | hand-written | Chez-idiomatic flat-vector matrix library        |

Auto-generated files are safe to delete and regenerate.

** Quick start

1. Install libraylib (~brew install raylib~ or build from source).
2. Put ~libraylib.dylib~ (or ~.so~ / ~.dll~) into ~/Library/chezscheme/raylib/~.
3. Build: ~scheme --script src/raylib_binding_generator.ss~
4. Compile the four ~.sls~ files under ~src/~, then copy ~.sls~ + ~.so~ into
   ~/Library/chezscheme/raylib/~. (See [[./docs/BUILD.org][BUILD.org]] for exact commands.)
5. Run a test: ~scheme --script test/core/core_basic_window.ss~

Tests (41 total): ~core/ (14)~, ~textures/ (7)~, ~shapes/ (4)~, ~text/ (4)~,
~models/ (8)~, ~audio/ (4)~.

** Requirements

- Chez Scheme ≥ 9.5.8 (tested with Chez 10.5.0-pre-release).
- raylib ≥ 6.1 (dynamic library, statically includes rlgl).

** See also

- [[./docs/GENERATOR.org][GENERATOR.org]] — how the binding generator works, sexpr source format
- [[./docs/CONVENTIONS.org][CONVENTIONS.org]] — naming, struct-return, ftype vs record types
- [[./src/raylib_binding_generator.ss][raylib_binding_generator.ss]] — the generator itself

Not written in Markdown, so it's shown here as plain text — view it formatted on GitHub.

Contributors

Yunoinsky

86 commits

Languages

Scheme

100.0%