cray_raygui
Version, currently master branch1 version
- master branchlatestSep 14, 2018
gitlab.com/TeddyDD/cray-raygui
Raygui bindings to Crystal
Installation
# Add this to your shard.yml
dependencies:
cray_raygui:
gitlab: TeddyDD/cray-raygui
branch: mastermaster is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
0.26.1- License
- MIT
- Author
- Daniel Lewan
Dependencies
Runtime Dependencies
- cray*gitlab: TeddyDD/cray, branch: raylib-2
README
cray-raygui

Raygui bindings for Crystal, meant to be used with cray library. Cray is Raylib bindings.
Installation
Add this to your application's shard.yml:
dependencies:
cray-raygui:
gitlab: TeddyDD/cray-raygui
branch: raylib-2
Usage
require "cray"
require "cray_raygui"
TODO: Write usage instructions here
Development
Bindings are generated using libgen tool. Generating bindings from scratch is manual process for simplicity. Fortunetly, for normal usage it is not required, and small chagnes in Raygui could be covered manually on bindigs side.
It looks like this:
- Install and build libgen: https://github.com/olbat/libgen
- Download Raygui and copy
src/raygui.htosrc/cray_raygui/raygui.h - Modify
raygui.h: replace#define RAYGUI_STANDALONEwith
#define RAYGUI_IMPLEMENTATION
#define RAYGUI_STYLE_SAVE_LOAD
- Generate bindings using libgen:
libgen ./lib-raygui.yml - libgen will create two files in
src/cray_raygui
- generated/cray_raygui/application.cr
- generated/cray_raygui/cray_raygui.cr
- Now you have to combine functions from those files into single
src/cray_raygui/gui.crfile. Beware of duplicates. Don't copy type definitions, they are declared inLibRayin cray. - Fix type names (Rectangle -> LibRay::Rectangle, same for Vector2, Color)
- Remove generated files
- Remove
gui_prefixes fromgui.cr, who needs that? - Bind load/save functions manually (
src/cray_raygui/load_save.cr) - Create enums definitions in
src/cray_raylib/enums.cr
As you can see process of generating bindings from scratch is quite complicated. It's not needed for using library, and in the future I might write script to automate it.
Contributing
- Fork it (https://gitlab.com/TeddyDD/cray-raygui/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Format crystal files with
crystal tool format **.cr - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Contributors
- TeddyDD Daniel Lewan - creator, maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
master- Seen
- Sep 14, 2018
- Crystal
0.26.1- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
gitlab.com/TeddyDD/cray-raygui
Metadata
- Created
- Aug 16, 2026
- Updated
- Aug 16, 2026
- Synced
- Aug 16, 2026
- Versions
- 1