Skip to content

AlexB52/raylib-rb

Repository files navigation

raylib-rb

Raylib bindings for mruby, built as an mrbgem with a vendored raylib submodule. This repo includes the C bindings in src/ plus Ruby examples in examples/ and support code in mrblib/.

Quick start

  1. Sync submodules:
bin/sync
  1. Build mruby with the raylib gem configuration:
bin/build
  1. Run a Ruby script with the bundled mruby binary:
bin/run examples/your_script.rb

Handy commands

  • bin/console: Launch mirb against the built mruby.
  • bin/check: Run the repo checks (currently bin/audit).
  • bin/audit: Detect unused bindings in src/ based on examples/ + mrblib/ usage.
  • bin/debug: Run mruby under LLDB for native debugging.
  • bin/example <name>: Launch matching mruby + C examples by bare name (for example shaders_shadowmap_rendering).

Repository layout

  • src/: C bindings for raylib.
  • mrblib/: Ruby helpers/classes for the bindings.
  • examples/: Ruby examples using raylib.
  • deps/: Submodules for raylib and mruby.
  • config/: mruby build configuration.

Notes

  • The build configuration currently includes macOS framework linker flags (see mrbgem.rake). If you are on another platform, you will need to adjust those flags.

Wonky examples

These examples are known to be faulty compared to their respective C examples. Contributions to fix them are welcome.

  • textures_screen_buffer
  • text_3d_drawing
  • shapes_rlgl_triangle

About

MRuby bindings for Raylib 5.5

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors