mruby on C#: From VM Implementation to Game Scripting

What if mruby could run anywhere—without any C compilation? I built MRubyCS, a complete mruby VM implementation in pure C#. This makes embedding mruby in cross-platform applications far easier. Cross-platform distribution means juggling build targets, static/dynamic linking, and diverse host machines—a constant hassle (iOS, Web, Win, Mac, consoles, etc.). And on closed platforms like game consoles (Ps, Switch, Xbox..), it's often impractical without SDK access—now it just works. Unity and .NET already handle platform abstraction for you. This also opens new doors for the Ruby community. Game development has long been a space where Ruby has limited presence. With mruby running in Unity, Ruby developers can bring their language into one of the world's most popular game engines—for scripting game logic, building tools, and more. Beyond the VM implementation story, I'll show practical game scripting with VitalRouter.MRuby and Fiber-based coroutines!

  • hadashiA
    hadashiA

    I'm a game developer and software engineer with experience in large-scale, performance-critical application development across web and game industries. In recent years, I've been actively developing open-source libraries for C# and Unity.