mruby is a lightweight implementation of the Ruby language that can be embedded within applications.
The project addresses the need for a Ruby runtime small enough to link directly into other software while maintaining compatibility with Ruby syntax and the ISO standard. It achieves this by providing a minimal but functional Ruby interpreter written in C. The tool includes a bytecode compiler that can generate compiled code either as standalone bytecode or embedded in C source files, making it suitable for scenarios where you want to ship Ruby programs as part of a larger application without requiring a full Ruby installation.
mruby suits projects that need scripting capabilities within a C or C++ application, embedded systems with limited resources, or situations where you want to distribute Ruby code without exposing source. The project provides multiple entry points: the mruby interpreter for direct execution, the mirb interactive shell for exploration, and the mrbc compiler for ahead-of-time compilation. It supports customization through mrbgems, allowing you to build a tailored runtime with only the features your application requires. The tool also supports amalgamation, combining all source files into a single C file and header for simplified embedding, similar to how SQLite packages itself.
The project maintains active development with regular testing infrastructure in place. Code quality is enforced through automated linting. Documentation is generated in multiple formats including API documentation via YARD and C API documentation via Doxygen and Graphviz. Community engagement occurs through GitHub issues rather than a separate mailing list. The project accepts contributions and maintains a visible list of contributors.