Files
mruby-mruby/doc
Yukihiro "Matz" Matsumoto 851da984b4 gc.c: use :debt instead of :threshold in GC.stat
Expose gc_debt directly as :debt in GC.stat without sign negation.
The debt model has no threshold ceiling, so :threshold was a
misleading name. Negative debt means credit, positive means GC
is behind on collection work.

Co-authored-by: Claude <noreply@anthropic.com>
2026-04-23 19:25:24 +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