Crystal Bindings for raylib, a small and easy to use game development library.
As for now the bindings only support the raw function calls from raylib itself.
raymath functions are also supported, as are infix operators for vectors,
matricies, and quaternions. We also have physac and raygui support built in.
These platforms are supported out of the box and are linked statically
x86_64-linux-gnu= 64-bit Linuxx86_64-windows= 64-bit Windows
- Install raylib from github
- Run
make installin raylib - Add
raylib-crto yourshard.yml:
dependencies:
raylib-cr:
github: sol-vin/raylib-cr- Run
shards install - Get programming!
- Install crystal with
scoop install crystal - Copy
./rsrc/native/windows/raylibtoC:\raylib - Run in powershell
$env:LIB="${env:LIB};C:\raylib\lib"
$env:PATH="${env:PATH};C:\raylib\lib"- Run in cmd
set PATH=%PATH%;C:\raylib\lib
set LIB=%LIB%;C:\raylib\lib- Go back to your project directory. Add
raylib-crto yourshard.yml:
dependencies:
raylib-cr:
github: sol-vin/raylib-cr- Run
mkdir lib && cd lib && git clone https://github.com/sol-vin/raylib-cr - Get programming!
require "raylib-cr"
LibRaylib.init_window(800, 450, "Hello World")
LibRaylib.set_target_fps(60)
until LibRaylib.close_window?
LibRaylib.begin_drawing
LibRaylib.clear_background(LibRaylib::RAYWHITE)
LibRaylib.draw_text("Hello World!", 190, 200, 20, LibRaylib::BLACK)
LibRaylib.end_drawing
end
LibRaylib.close_window- Fork it (https://github.com/sol-vin/raylib-cr)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
- sol-vin - maintainer
- AregevDev - creator and maintainer