Ruby sandboxing vs. integrating a scripting language

后端 未结 2 1298
Happy的楠姐
Happy的楠姐 2021-02-05 13:03

I am currently working on a text-based game engine in Ruby, with the app separated into Ruby code in /lib and YAML data in /data, which is loaded when needed by the game. I want

2条回答
  •  被撕碎了的回忆
    2021-02-05 13:29

    Consider using jRuby instead of Ruby. Java was originally implemented to support mobile code (back in the set-top days) and has a well-tested security model/implementation that could, I suspect, wrap enough of jRuby to keep user scripts/classes from creating havoc with the rest of the game system. jRuby supports embedding, as well, which may help separate the game core from the user applications, although I do not know how robust it is at this time.

    And, of course, jRuby is Ruby!

提交回复
热议问题