Back to Mruby

mruby Documentation

doc/README.md

4.0.03.5 KB
Original Source

mruby Documentation

Getting Started

New to mruby? Start here:

DocumentDescription
Getting StartedBuild mruby and run your first program
Language FeaturesRuby subset supported by mruby
LimitationsBehavioral differences from CRuby

Guides (for embedders and gem authors)

Embedding mruby in C

DocumentDescription
C API ReferenceValues, classes, methods, error handling, fibers
GC ArenaManaging temporary objects in C extensions
LinkingLinking with libmruby
AmalgamationSingle-file build for easy integration
Precompiled SymbolsCompile-time symbol allocation

Building and Configuring

DocumentDescription
CompilationBuild system, cross-compilation, toolchains
Build ConfigurationCompile-time macros (MRB_* flags)
mrbgemsCreating and managing gems
MemoryAllocator customization and heap regions

Tools

DocumentDescription
DebuggerUsing mrdb for debugging
ROM Method TablesRead-only method tables for constrained devices

Reference

DocumentDescription
Directory StructureSource tree layout

Internals (for mruby contributors)

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

DocumentDescription
ArchitectureOverview of object model, VM, GC, compiler
Virtual MachineDispatch loop, call frames, method lookup, fibers
Garbage CollectorTri-color marking, write barriers, generational GC
Compiler PipelineParser, code generator, IRep, binary format
OpcodesVM instruction set reference
Value BoxingHow mrb_value encodes types

Release Notes