{"repo":"johnfairh/RubyGateway","free":true,"listed":false,"github":"https://github.com/johnfairh/RubyGateway","clone":"git clone https://github.com/johnfairh/RubyGateway.git","description":"Embed Ruby in Swift: load Gems, run scripts, call APIs seamlessly in both directions.","language":"Swift","stars":173,"topics":["swift","ruby","api","linux","macos","bindings"],"license":null,"category":"api-integrations-sdks","readme_excerpt":"RubyGateway Embed Ruby in Swift: load Gems, run Ruby scripts, invoke APIs seamlessly in both directions. RubyGateway is a framework built on the Ruby C API that lets Swift programs running on macOS or Linux painlessly and safely run and interact with Ruby programs. It's easy to pass Swift values into Ruby and turn Ruby objects back into Swift types. RubyGateway lets you call any Ruby method from Swift, including passing Swift closures as blocks. It lets you define Ruby classes and methods that are implemented in Swift. See CRuby if you are looking for a low-level Ruby C API wrapper. Examples Documentation Requirements Installation Contributions License Examples Services Rouge is a code highlighter. In Ruby: In Swift: Calling Ruby Calling Swift Bound class definition: Called from Ruby: Global variables: Global functions: Calls from Ruby: Documentation User guide API documentation Docset for Dash Requirements Swift 6.0 or later, from swift.org or Xcode 16+ macOS (tested on 15.3) or Linux (tested on Ubuntu Jammy) Ruby 2.6 or later including development files: For macOS, these come with Xcode. For Linux you may need to install a -dev package depending on how your Ruby is installed. RubyGateway requires 'original' MRI/CRuby Ruby - no JRuby/Rubinius/etc. Installation For macOS, if you are happy to use the system Ruby then you just need to include the RubyGateway framework as a dependency. If you are building on Linux or want to use a different Ruby then you also need to configure C","default_branch":null,"files":null,"tree":[],"storefront":"/r/johnfairh","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/johnfairh/RubyGateway/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}