Add the following code to your project's shard.yml under:
to use in production
- OR -
development_dependencies to use in development
Complete RayLib 2.6 bindings to Crystal.
Add this to your application's
dependencies: cray: github: mswieboda/cray
The RayLib libraries are copied to your projects
Currently they contain:
libraylib.2.6.0.dylib libraylib.261.dylib libraylib.so # (TBD: need to compile and add to repo) libraylib.dylib
*.dylib is used for MacOS, while
*.so will be for Linux.
TODO: will try to have MacOS compile to
*.so as well so only one file is needed regardless of platform.
Use these environment variables to load the library when building or running your project:
env LIBRARY_PATH="$(PWD)/lib_ext" crystal build src/your_project.cr
env LD_LIBRARY_PATH="$(PWD)/lib_ext" crystal build ./your_project
Makefile for building and running the examples and how you might setup your
Makefile for easier development.
Check out the examples in the
You can run
make run_examples to run all of the examples one after another.
The function names are the same as the names in the cheatsheet, with the following differences:
Isprefixes are stripped. For example,