RubyGateway: Embed Ruby in Swift

by futurecaton 8/13/2024, 3:56 PMwith 7 comments

by sparker72678on 8/15/2024, 2:27 PM

This is probably not what anyone who reads this title is expecting it to be.

On the other hand, there's a project on iOS, "Rubyist", that embeds mRuby and lets you actually write, parse, and execute ruby code within your app. It even has some hooks for calling into some iOS APIs (Widget APIs, most notably). It's a fun idea, but might be a dead project. https://rubyist.app

I wish there was a canonical Xcode project getting mRuby imported into an iOS/Mac app, so anyone could use it as a starting point for their ideas. I dunno, maybe one is out there and I just haven't found it?

by Alifatiskon 8/14/2024, 9:11 AM

Are there any limitations in this?

Also, the project spelled "access" wrong here:

// Acess an attribute print("Name is \(student.get("name"))")

I don't know if it's worth making a PR for such a tiny thing.

by ksnsnsjon 8/15/2024, 10:41 PM

Does this need ruby on the host? I'm asking because it's really difficult to have a portable ruby binary, only traveling ruby comes to mind