Common Lisp FFI wrapper for libSDL2.
It only requires vanilla CFFI when used, no extra dependencies.
Written by email@example.com.
The primary communication channel is the facilities on the project's GitHub page.
This project uses CFFI/C2FFI, whose ASDF extension does two things:
- When needed, it can invoke c2ffi
to process a C header file and emit a c2ffi spec file (a json file) that contains every detail needed to generate an FFI for a given platform. But yours truely has run this phase, and checked in the resulting spec files into the c2ffi-spec/ directory. This way users don't need to have a working c2ffi executable, nor the SDL dev headers installed.
- Based on the above mentioned spec file, it generates the CFFI forms
into a lisp file (placed next to the spec file), and continues as if it was just another lisp file written by hand. (These lisp files could also be committed into the repo, but for now they are not, because their regeneration is automatic and painless.)
Regenerate the spec files
This should only be done when the SDL API has some new functionality
that is needed on the Lisp side. Once the
*.spec files got
regenerated, they should be pushed into the git repo; i.e. the users
hu.dwim.sdl shouldn't need to do this normally.
This should work, assuming that you have a working
c2ffi in the
sudo apt-get install curl sbcl libsdl2-dev rm -f c2ffi-spec/*.spec && ./bin/generate-spec-files.sh
$ nix-shell --pure $ rm -f c2ffi-spec/*.spec && ./bin/generate-spec-files.sh
It contains a complete FFI for
Not much has been added yet to lispify the SDL API, but the CFFI binding part is complete.