mruby on C#: From VM Implementation to Game Scripting
summary
A C# reimplementation of the mruby VM called MRubyCS runs as a pure .NET package so Unity and other C# apps avoid native builds — installable via dotnet add package MRubyCS. Compatibility is strong: about 4,200 tests pass and Ruby semantics like return-from-block, singleton/include order, Fiber, and string APIs work. mrb_value uses 16 bytes in this port (trading memory for safety), performance reaches parity with C mruby when JIT tiers optimize, and exceptions and async/await interop are implemented so game scripting and hot-reload sequences run on the C# async stack.
AI-written summary · about
chapters (7)
- 0:00Introduction to mruby in games
- 5:15Why mruby for game scripting
- 9:59Challenges embedding mruby in C#
- 15:36Solution: C# mruby VM
- 20:09Compatibility and performance focus
- 24:22Optimizing the C# mruby VM
- 30:04Results and call to action








