encyclopegia.org

Mruby

mruby is an interpreter for the Ruby programming language with the intention of being lightweight and easily embeddable. The project is headed by Yukihiro Matsumoto, with over 100 contributors currently working on the project.

mruby is an interpreter for the Ruby programming language with the intention of being lightweight and easily embeddable. The project is headed by Yukihiro Matsumoto, with over 100 contributors currently working on the project. ==Features== mruby 1.0 supports the Ruby 2.1 core API, but none of the standard library. As well as being able to execute most basic Ruby code, mruby also features a bytecode compiler and virtual machine, as well as the ability to be easily embedded and integrated into C or C++ code, in a similar manner to Lua or Tcl. mruby 2.0.0 adds support for several Ruby 2.x methods beyond Ruby 2.1. v2.0.0 also changed to variable length bytecode instructions format. mruby bytecode can be embedded in C code, and thus, can be compiled into a standalone executable. mruby also aims to be compliant with the ISO/IEC 30170:2012 standard. ==Examples== ===Calling mruby from C=== include include include int main(void) { mrb_state *mrb = mrb_open(); char code[] = "5.times { puts 'mruby is awesome!' }"; printf("Executing Ruby code with mruby:\n"); mrb_load_string(mrb, code); mrb_close(mrb); return 0; } Assuming that the mruby library and headers are installed, the program can be compiled and executed by running the following commands from the terminal: $ cc example.c -lmruby -lm -o example $ ./example ===Precompiled Bytecode=== mruby includes a minimalistic virtual machine used to execute mruby bytecode, nicknamed RiteVM: $ mrbc test.rb $ mruby -b test.mrb The first command compiles Ruby code to mruby bytecode, creating a file called "test.mrb", which can then be executed by appending the "-b" flag to the normal interpreter arguments. ==References==

References

No reference rows published for this article.

Cite this article

MLA

"Mruby." encyclopegia.org, 2026, https://encyclopegia.org/wiki/mruby. Accessed 23 November 2026.

Chicago

"Mruby." encyclopegia.org. Accessed November 23, 2026. https://encyclopegia.org/wiki/mruby.

APA

encyclopegia.org. (2026). Mruby. Retrieved November 23, 2026, from https://encyclopegia.org/wiki/mruby

Accessed November 23, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

Verse Simmonds

enwiki · references available

100 Squadron

enwiki · references available

Bonski

enwiki · references available

Colors (Broiler song)

enwiki · references available

Bongo (short story)

enwiki · references available

Fight the Silence

enwiki · references available

ReactiveX

enwiki · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1358859767 · 0.5 · snapshot enwiki-001358859767

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.