Files
mruby-mruby/doc
Yukihiro "Matz" Matsumoto 9bb40386ce limitations.md: document nested def scope in singleton methods
mruby places `def` written inside `def self.foo` on the receiver's
singleton class (making it a class method of the enclosing class).
CRuby places it as an instance method of the lexical enclosing
class. This is a long-standing divergence that we've chosen to
document rather than change.

close #1536

Co-authored-by: Claude <noreply@anthropic.com>
2026-05-11 08:31:19 +09:00
..
2024-09-24 00:14:24 +10:00
2025-07-25 16:10:03 +09:00
2025-05-14 02:01:02 +10:00

mruby Documentation

Getting Started

New to mruby? Start here:

Document Description
Getting Started Build mruby and run your first program
Language Features Ruby subset supported by mruby
Limitations Behavioral differences from CRuby

Guides (for embedders and gem authors)

Embedding mruby in C

Document Description
C API Reference Values, classes, methods, error handling, fibers
GC Arena Managing temporary objects in C extensions
Linking Linking with libmruby
Amalgamation Single-file build for easy integration
Precompiled Symbols Compile-time symbol allocation

Building and Configuring

Document Description
Compilation Build system, cross-compilation, toolchains
Build Configuration Compile-time macros (MRB_* flags)
mrbgems Creating and managing gems
Memory Allocator customization and heap regions

Tools

Document Description
Debugger Using mrdb for debugging
ROM Method Tables Read-only method tables for constrained devices

Reference

Document Description
Directory Structure Source tree layout

Internals (for mruby contributors)

Start with Architecture for an overview, then dive into the subsystem you need:

Document Description
Architecture Overview of object model, VM, GC, compiler
Virtual Machine Dispatch loop, call frames, method lookup, fibers
Garbage Collector Tri-color marking, write barriers, generational GC
Compiler Pipeline Parser, code generator, IRep, binary format
Opcodes VM instruction set reference
Value Boxing How mrb_value encodes types

Release Notes