Skip to content
ruby language binding for godot game engine
Ruby C Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


godot-ruby provides a Ruby language binding for Godot game engine. It is designed to be a drop-in replacement of GDScript.

However this project is mainly experimental due to serveral limitations. Use in production is highly not recommended.


Modify the paths in env.yml and makefile then make. Currently only Linux (and Mac maybe) are supported because the workaround of limitation 3. uses pthread.h.


godot-ruby utilizes code generation to generate Godot apis and bind them to ruby side. By defining C types and Ruby classes, the apis can be automatically generated, as generated.c. Therefore the code for this project is simple.

The util folder contains code for generation. lib contains Ruby codes and src contains C codes.

Known limitations

  1. godot-ruby is considerably slower than GDScript (about 15x in my benchmark, see This could be due to inefficient implementation of pluginscript api.
  2. Ruby's method semantic is incompatible with the seperate properties and methods in GDScript since there are only methods in Ruby. For this we have to use get which looks weird:
rect2.position #GDScript
rect2.get(:position) #Ruby
  1. CRuby vm cannot support multi-threading. When godot engine calls the vm in different threads it crashs, which happens in resource preview loading (could be safely bypassed). To solve this we can use MRuby instead or use a single thread to run Ruby vm. However these two all need thread and mutex support and GDNative api currently does not provide one.
You can’t perform that action at this time.