Move aside, Py, there’s a new sheriff in town!
Godot.rb – Ruby in Godot Engine ![justforfunnoreally.dev badge](https://github.com/camo/47ea42fdcf9f5f0bcf61fd649188a99f8c720108874d9dcddff3e4351fb8d383/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6a757374666f7266756e6e6f7265616c6c792d6465762d396666)
While the Ruby land designs are mostly set, the C side code are all still experiments. Even the core components see occasional rewrites.
Moreöver, the lead maintainer is a C novice, so thank you early adopters for beïng prepared to encounter and report segfaults and core dumps 😅.
-
As betaware, only Windows and RubyInstaller2 without Devkit is tested currently. It also needs MinGW in the
PATH
. Things will go unexpected with the MSYS2 Devkit.- Support for Devkit and Linux are planned, but not for Windows going through WSL (but Linux support means yes for Godot Engine and Ruby both contained in WSL).
-
I might publish this project to RubyGems in the future. For now, download/clone this repo to a consistent place (i.e., not the Downloads folder) and run:
gem install mingw-make gem install rake rake-compiler json rake rake clean # optional, delete leftovers
If you don’t have symlink permissions, consider admin elevation for the
rake
line so the script symlinks Ruby DLLs rather than duplicating them. -
Copy-paste or symlink
generated/godot_rb.gdextension
in your Godot Project (Unlike nearly all GDExtensions, this one uses absolute paths so multiple projects can share the same install.) -
Have fun with real singletons! 💎 (No ideas on exporting projects currently…)
-
The
Rakefile
is for building, not setting up… -
bundle install
fails on RubyInstaller no-Devkit because of theGemfile
appsteep
’s transitive dependencyffi
. Gem insists to use the platform-independent version of theffi
gem, which doesn’t know aboutbin/ruby_builtin_dlls/libffi-8.dll
and must compilelibffi
from scratch withlibffi
ownMakefile
. I’m unable to work around this problem one way or another (#help-wanted
). -
RubyInstaller Ruby utilizes the new Universal C Runtime, but Godot Engine still uses the old MS VC++ Runtime, for they support (on a best-effort basis) the minority who refuse to upgrade their outdated Windows versions. See godotengine/godot-proposals#9111 regarding the situations. Fortunately, while mixing runtimes is unsupported, the only known issue is that Ruby cannot print to console (only
Godot#print
and etc. can).
[TBA]
[TBA]
[TBA]
[TBA]
[TBA]
Copyright (c) 2014-present Godot Engine contributors. https://godotengine.org/license/
Copyright 2024 ParadoxV5
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.